You will probably need to run the report using the RUN_REPORT_OBJECT built-in procedure before calling web.show_document, and I would recommend to do it that way, so you don't need to compromise security including the database connection information in the URL.
This is an example:
<pre>declare good luck
repid REPORT_OBJECT; Rashid Shah
v_rep VARCHAR2(100);
rep_status VARCHAR2(20);
BEGIN
repid := FIND_REPORT_OBJECT('REPORT1');
SET_REPORT_OBJECT_PROPERTY(repid, REPORT_server, 'repsrv');
SET_REPORT_OBJECT_PROPERTY(repid, REPORT_DESTYPE, CACHE);
SET_REPORT_OBJECT_PROPERTY(repid, REPORT_DESFORMAT, 'HTML');
<b> SET_REPORT_OBJECT_PROPERTY(repid, REPORT_OTHER, 'PARAMFORM=YES');</b>
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
/*Display report in the browser*/
WEB.Show_Document('/reports/rwservlet/getjobid' ||substr(v_rep,instr(v_rep,'_',-1)+1) || '?destype=cache&desformat=pdf/html&server=' || 'repsrv', '_blank');
ELSE
message('Error when displaying report in browser');
END IF;
END;</pre>
-CarlosDL
---------
Dont bother for writing long codes. if you want the report's parameter from to display then just write the following amended code. Read it carefully.
DECLARE
rep_url varchar2(2000);
BEGIN<pre>
rep_url:='/reports/rwservlet?'
||'&report=c:testrpt10g.rdf'
||'&desformat=htmlcss&destype=cache'
||'&userid=username/password@databaseparamform=yes';
WEB.SHOW_DOCUMENT(rep_url,'_blank');
END;
good luck
Rashid Shah</pre>
Easy enough, and your security has been compromised…
The code is working but in url it is showing all the information like ‘&report=C:formsemp_scott_tiger.rdf’||’&desformat=htmlcss&destype=file’||’&userid=scott/tiger@orcl’
how to hide this information
please go through this code
warm regards
Muzeeb
Muzeeb, I have modified the answer adding the original one back.
Take a look.