Calling reports from forms [message #425704] |
Sun, 11 October 2009 23:55 |
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 #425734 is a reply to message #425723] |
Mon, 12 October 2009 01:04 |
charuamit
Messages: 121 Registered: January 2009
|
Senior Member |
|
|
okee....thanks...its working
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 #425758 is a reply to message #425755] |
Mon, 12 October 2009 02:19 |
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 |
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 #425785 is a reply to message #425782] |
Mon, 12 October 2009 03:42 |
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
|
|
|
|
|