Call parameter from Oracle Reports 10g web.show_doc

35 pts.
Tags:
Oracle 10g
Oracle development
Oracle Forms 10g
Web.Show_Document
Here's 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; 
It's running well but now I want the report's parameter form to be displayed. How can I do this using web.show_document(...)

Answer Wiki

Thanks. We'll let you know when a new response is added.

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:

declare
repid REPORT_OBJECT;
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;

-CarlosDL

———

Don’t 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
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

Discuss This Question: 3  Replies

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
  • carlosdl
    Easy enough, and your security has been compromised...
    70,220 pointsBadges:
    report
  • Muzeeb
    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 pointsBadges:
    report
  • carlosdl
    Muzeeb, I have modified the answer adding the original one back. Take a look.
    70,220 pointsBadges:
    report

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following