Home » Developer & Programmer » Forms » Calling reports from forms
Calling reports from forms [message #425704] Sun, 11 October 2009 23:55 Go to next message
charuamit
Messages: 121
Registered: January 2009
Senior Member
Hi

when i call a report from a form using web.show_document, it displays the full details in the URL (when u run it on the browser)....server ip,port,report location,userid and password....destype,desformat....parameters etc...

How can i hide everything except the server and report name from the URL in the simplest manner...?

I am using DeveloperSuite 10g.

Please help me urgently.

Thanks and regards.
Charu
Re: Calling reports from forms [message #425706 is a reply to message #425704] Mon, 12 October 2009 00:09 Go to previous messageGo to next message
omaribais
Messages: 34
Registered: October 2009
Location: Bangladesh
Member

hi Charu,

You can hide user name and password by configuring report key in cgicmd.dat file in report/conf folder of your DevSuite. and you have to install a report server.
Re: Calling reports from forms [message #425707 is a reply to message #425706] Mon, 12 October 2009 00:16 Go to previous messageGo to next message
charuamit
Messages: 121
Registered: January 2009
Senior Member
okee and how can i do it ??
can u please mention an example of cgicmd.dat ??
i have a reportserver.

thanks and regards.
charu
Re: Calling reports from forms [message #425712 is a reply to message #425707] Mon, 12 October 2009 00:30 Go to previous messageGo to next message
omaribais
Messages: 34
Registered: October 2009
Location: Bangladesh
Member

hi,

1. Go the folder
<DevSuite>/report/conf.

2. open cgicmd.dat file and put the following code at bellow of file,
rpt1: userid=<user_name>/<Password>@<tns> destype=cache desformat=pdf server=<Report_server_name> %*


3. put the report key "rpt1" in web.show_document procedure.like

web.show_document('/reports/rwservlet?rpt1'||<others parameters>,'_blank');


Thanks,
- Omar
Re: Calling reports from forms [message #425714 is a reply to message #425712] Mon, 12 October 2009 00:32 Go to previous messageGo to next message
charuamit
Messages: 121
Registered: January 2009
Senior Member
okee....bt wht if u have multiple schemas...then ??
we will create key 1,key 2 etc and use it for different systems ??

thanks
charu
Re: Calling reports from forms [message #425715 is a reply to message #425714] Mon, 12 October 2009 00:34 Go to previous messageGo to next message
omaribais
Messages: 34
Registered: October 2009
Location: Bangladesh
Member

Yea, you can do.
Re: Calling reports from forms [message #425718 is a reply to message #425715] Mon, 12 October 2009 00:42 Go to previous messageGo to next message
charuamit
Messages: 121
Registered: January 2009
Senior Member
hi
sorry fr troubling u bt in the statement u wrote....where do i specify the report name ?

please update the statement below for me to include rpt1:-

WEB.SHOW_DOCUMENT('http://Dell05-246.hct.org:8889/reports/rwservlet?report=C:\Documents and Settings\Administrator\Desktop\INV_SYS\report\DEP_ROOM.rdf&userid=inv/inv@hctorcl&desformat=html&destype=cache&paramform=no&P1='||:DP_NAME,'window1');


i have updated my cgicmd.bat to include at the end :
rpt1: userid=inv/inv@hctorcl destype=cache desformat=pdf server=repserver90 %*


thanks and regards.
Re: Calling reports from forms [message #425723 is a reply to message #425718] Mon, 12 October 2009 00:51 Go to previous messageGo to next message
omaribais
Messages: 34
Registered: October 2009
Location: Bangladesh
Member

hi charu,
At first put the desformat=html instead of pdf because you want the report in html format not in pdf.

Now use the following code in your form,

WEB.SHOW_DOCUMENT('http://Dell05-246.hct.org:8889/reports/rwservlet?rpt1&report=C:\Documents and Settings\Administrator\Desktop\INV_SYS\report\DEP_ROOM.rdf&P1='||:DP_NAME,'window1');
Re: Calling reports from forms [message #425734 is a reply to message #425723] Mon, 12 October 2009 01:04 Go to previous messageGo to next message
charuamit
Messages: 121
Registered: January 2009
Senior Member
okee....thanks...its working Smile

but u know my boss gave me a bit of code and told me that she used it previously and it wont even show the report name...


DECLARE
repid REPORT_OBJECT;
v_rep VARCHAR2(100);
rep_status varchar2(20);
begin

repid := find_report_object('REPORT118');

SET_REPORT_OBJECT_PROPERTY(repid,REPORT_EXECUTION_MODE,BATCH);

SET_REPORT_OBJECT_PROPERTY(repid,REPORT_COMM_MODE,SYNCHRONOUS);

SET_REPORT_OBJECT_PROPERTY(repid,REPORT_DESTYPE,CACHE);

SET_REPORT_OBJECT_PROPERTY(repid,REPORT_DESNAME,'DEP_ROOM.rdf');

SET_REPORT_OBJECT_PROPERTY(repid,REPORT_DESFORMAT,'htmlcss');

SET_REPORT_OBJECT_PROPERTY(repid,REPORT_SERVER,'repserver90');

SET_REPORT_OBJECT_PROPERTY(repid,REPORT_OTHER,'paramform=no&P1='||:DP_NAME);

v_rep := RUN_REPORT_OBJECT(repid);

rep_status := REPORT_OBJECT_STATUS(v_rep);

WHILE rep_status in ('RUNNING','OPENING_REPORT','ENQUEUED')
LOOP
rep_status := report_object_status(v_rep);
END LOOP;
IF rep_status = 'FINISHED' THEN
WEB.SHOW_DOCUMENT('http://Dell05-246.hct.org:8889/reports/rwservlet/getjobid'|| substr(v_rep,instr(v_rep,'_',-1)+1)||'?'||'server=repserver90','_blank');
ELSE
message('Error when running report');
END IF;

EXCEPTION

WHEN OTHERS THEN
MESSAGE(SQLERRM);

end;

But when i run this code i get FRM 41214...unable to run report.

Any ideas...as i dont even wan the report name in the URL and if i specify the report name in the cgicmd.bat then it will be full of keys...corresponding to the no. of reports.

Thanks
charu












Re: Calling reports from forms [message #425737 is a reply to message #425734] Mon, 12 October 2009 01:08 Go to previous messageGo to next message
omaribais
Messages: 34
Registered: October 2009
Location: Bangladesh
Member

Hi charu,

The code you get from your boss it will work if the report inside the calling form.

Thanks,
Omar
Re: Calling reports from forms [message #425740 is a reply to message #425737] Mon, 12 October 2009 01:12 Go to previous messageGo to next message
charuamit
Messages: 121
Registered: January 2009
Senior Member
yaah i embedded the report inside my form bt still the error comes .... i think something to do with run_report_oject
Re: Calling reports from forms [message #425742 is a reply to message #425734] Mon, 12 October 2009 01:16 Go to previous messageGo to next message
omaribais
Messages: 34
Registered: October 2009
Location: Bangladesh
Member

you can try with modifying two lines of your code,
SET_REPORT_OBJECT_PROPERTY(repid,REPORT_OTHER,'P1='||:DP_NAME);
and
SET_REPORT_OBJECT_PROPERTY(repid,REPORT_DESFORMAT,'html');

Thanks
Re: Calling reports from forms [message #425746 is a reply to message #425742] Mon, 12 October 2009 01:20 Go to previous messageGo to next message
charuamit
Messages: 121
Registered: January 2009
Senior Member
see right now the URL z :
http://dell05-246.hct.org:8889/reports/rwservlet?rpt1&report=C:\Documents%20and%20Settings\Administrator\Desktop\INV_SYS\report\R OOM_PARAM.rdf&P2=MMC2

bt with her code it will be only....http://dell05-246.hct.org:8889/reports/rwservlet?

she didnt use any keys ...it was only with the code...

Re: Calling reports from forms [message #425755 is a reply to message #425746] Mon, 12 October 2009 02:05 Go to previous messageGo to next message
omaribais
Messages: 34
Registered: October 2009
Location: Bangladesh
Member

hi charu,

Did you try with my last message?

SET_REPORT_OBJECT_PROPERTY(repid,REPORT_OTHER,'P1='||:DP_NAME);
and
SET_REPORT_OBJECT_PROPERTY(repid,REPORT_DESFORMAT,'html');
Re: Calling reports from forms [message #425758 is a reply to message #425755] Mon, 12 October 2009 02:19 Go to previous messageGo to next message
charuamit
Messages: 121
Registered: January 2009
Senior Member
yaah i tried
it z throwing REP-50004: No report specified on the command line

the code used z:
DECLARE

repid REPORT_OBJECT;
begin
repid := find_report_object('REPORT118');

SET_REPORT_OBJECT_PROPERTY(repid,REPORT_DESFORMAT,'html');

SET_REPORT_OBJECT_PROPERTY(repid,REPORT_OTHER,'P1='||:DP_NAME);

WEB.SHOW_DOCUMENT('http://Dell05-246.hct.org:8889/reports/rwservlet?rpt1' ||'report=C:\Documents and Settings\Administrator\Desktop\INV_SYS\report\DEP_ROOM.rdf' ,'window1');
exception
when others then
message(sqlcode || sqlerrm);
end;

thanks
charu
Re: Calling reports from forms [message #425768 is a reply to message #425758] Mon, 12 October 2009 02:49 Go to previous messageGo to next message
omaribais
Messages: 34
Registered: October 2009
Location: Bangladesh
Member

i told you just replace those two line.
i.e.

DECLARE
repid REPORT_OBJECT;
v_rep VARCHAR2(100);
rep_status varchar2(20);
begin

repid := find_report_object('REPORT118');

SET_REPORT_OBJECT_PROPERTY(repid,REPORT_EXECUTION_MODE,BATCH);

SET_REPORT_OBJECT_PROPERTY(repid,REPORT_COMM_MODE,SYNCHRONOUS);

SET_REPORT_OBJECT_PROPERTY(repid,REPORT_DESTYPE,CACHE);

SET_REPORT_OBJECT_PROPERTY(repid,REPORT_DESNAME,'DEP_ROOM.rdf');

SET_REPORT_OBJECT_PROPERTY(repid,REPORT_DESFORMAT,'html');

SET_REPORT_OBJECT_PROPERTY(repid,REPORT_SERVER,'repserver90');

SET_REPORT_OBJECT_PROPERTY(repid,REPORT_OTHER,'P1='||:DP_NAME);

v_rep := RUN_REPORT_OBJECT(repid);

rep_status := REPORT_OBJECT_STATUS(v_rep);

WHILE rep_status in ('RUNNING','OPENING_REPORT','ENQUEUED')
LOOP
rep_status := report_object_status(v_rep);
END LOOP;
IF rep_status = 'FINISHED' THEN
WEB.SHOW_DOCUMENT('http://Dell05-246.hct.org:8889/reports/rwservlet/getjobid'|| substr(v_rep,instr(v_rep,'_',-1)+1)||'?'||'server=repserver90','_blank');
ELSE
message('Error when running report');
END IF;

EXCEPTION

WHEN OTHERS THEN
MESSAGE(SQLERRM);

end;


- Omar
Re: Calling reports from forms [message #425770 is a reply to message #425768] Mon, 12 October 2009 02:54 Go to previous messageGo to next message
charuamit
Messages: 121
Registered: January 2009
Senior Member
it z throwing FRM 41214 : Unable to run report
Re: Calling reports from forms [message #425771 is a reply to message #425770] Mon, 12 October 2009 03:00 Go to previous messageGo to next message
omaribais
Messages: 34
Registered: October 2009
Location: Bangladesh
Member

make sure the report server is running.

If it is, then remove the line rpt1 from cgicmd.

[Updated on: Mon, 12 October 2009 03:01]

Report message to a moderator

Re: Calling reports from forms [message #425772 is a reply to message #425771] Mon, 12 October 2009 03:02 Go to previous messageGo to next message
charuamit
Messages: 121
Registered: January 2009
Senior Member
it z....
any other hints ??
thanks for your constant help...

regards.
charu
Re: Calling reports from forms [message #425775 is a reply to message #425772] Mon, 12 October 2009 03:06 Go to previous messageGo to next message
omaribais
Messages: 34
Registered: October 2009
Location: Bangladesh
Member

Remove the line i defined in second step in my report key configuration (2nd post of this problem).

[Updated on: Mon, 12 October 2009 03:07]

Report message to a moderator

Re: Calling reports from forms [message #425776 is a reply to message #425775] Mon, 12 October 2009 03:10 Go to previous messageGo to next message
charuamit
Messages: 121
Registered: January 2009
Senior Member
still frm 41214 ....
Re: Calling reports from forms [message #425778 is a reply to message #425776] Mon, 12 October 2009 03:12 Go to previous messageGo to next message
omaribais
Messages: 34
Registered: October 2009
Location: Bangladesh
Member

can you send me a sample form with table script.

-Omar
Re: Calling reports from forms [message #425779 is a reply to message #425778] Mon, 12 October 2009 03:23 Go to previous messageGo to next message
charuamit
Messages: 121
Registered: January 2009
Senior Member
i m nt able 2 upload...some network prb perhaps

can u please give me your any other id where i can mail u

thanks
Re: Calling reports from forms [message #425782 is a reply to message #425779] Mon, 12 October 2009 03:26 Go to previous messageGo to next message
omaribais
Messages: 34
Registered: October 2009
Location: Bangladesh
Member

omaribais@yahoo.com
or
omaribais@gmail.com
Re: Calling reports from forms [message #425785 is a reply to message #425782] Mon, 12 October 2009 03:42 Go to previous messageGo to next message
charuamit
Messages: 121
Registered: January 2009
Senior Member
okee.... i got the error...the problem is that the parameter values contain spaces ... ex : Business Studies....
whenever space z there,then FRM 41214 will come
But we cant avoid spaces ... as all the parameters are more than 1 words with spaces in b/w

thanks and regards
charu
Re: Calling reports from forms [message #425799 is a reply to message #425785] Mon, 12 October 2009 04:39 Go to previous messageGo to next message
omaribais
Messages: 34
Registered: October 2009
Location: Bangladesh
Member

hi charu,
I read your post after sending mail. I am happy that you got the problem.
I have a suggestion for you, Always try to send Id as parameter instead of name. that will be faster your report.

Thanks
- Omar.
Re: Calling reports from forms [message #425801 is a reply to message #425799] Mon, 12 October 2009 04:42 Go to previous message
charuamit
Messages: 121
Registered: January 2009
Senior Member
yaah ....good solution....and then dp_id won have any space also so no problem will come

thanks really
charu
Previous Topic: If Port Number Is Changed Then ?
Next Topic: Sending SMS on mobile phone through Oracle form
Goto Forum:
  


Current Time: Mon Sep 26 02:34:51 CDT 2016

Total time taken to generate the page: 0.11427 seconds