35 pts.
 Call parameter from Oracle Reports 10g web.show_doc
the code DECLARE rep_url varchar2(2000); BEGIN rep_url:='/reports/rwservlet?' ||'&report=c:testrpt10g.rdf' ||'&desformat=htmlcss&destype=cache' ||'&userid=stlexport/stlexpst@as'; WEB.SHOW_DOCUMENT(rep_url,'_blank'); END; is running well. But now i want the report's parameter form to be displayed. How can i do this using web.show_document(...)

Software/Hardware used:
ASKED: May 15, 2009  9:20 AM
UPDATED: January 17, 2011  3:46 PM

Answer Wiki:
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>
Last Wiki Answer Submitted:  January 17, 2011  3:43 pm  by  Superad   35 pts.
All Answer Wiki Contributors:  Superad   35 pts. , carlosdl   63,535 pts.
To see all answers submitted to the Answer Wiki: View Answer History.


Discuss This Question:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _


 

Easy enough, and your security has been compromised…

 63,535 pts.

 

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

 10 pts.

 

Muzeeb, I have modified the answer adding the original one back.

Take a look.

 63,535 pts.