I want to pass a parameter using web.show_document() from a Form to a Report, I added the parameter in the URL but I don't know how to get it in the Report and use it .. anyone has an idea about that ?
Thanks in advance :)
To pass the parameters to report in Oracle Forms, you should use paramlist and pass it through run_report_object built-in and after that you can call the report using web.show_document by passing the report id. You can not pass report runtime parameters in web.show_document, below is the example:
pi_id := Create_parameter_list ('rep_param');
Add_parameter (pi_id,
'PARAMFORM',
TEXT_PARAMETER,
'no');
--- report object
--- the below report object 'cproreport' must be created in Report object navigator.
repid := Find_report_object ('cproreport');
Set_report_object_property (repid, report_filename, Rtrim(:parameter.report_path)||preport);
Set_report_object_property (repid, report_server, :parameter.r_server);
Set_report_object_property (repid, report_execution_mode, RUNTIME);
Set_report_object_property (repid, report_comm_mode, SYNCHRONOUS);
Set_report_object_property (repid, report_destype, cache);
Set_report_object_property (repid, report_desformat, pformat);
vc_reportserverjob := Run_report_object (repid, pi_id);
After that run web.show_document as following:
report_job_id :=
Substr (vc_reportserverjob,
Length (:parameter.r_server) + 2,
Length (vc_reportserverjob));
v_rep_status := Report_object_status (vc_reportserverjob);
If v_rep_status = 'FINISHED'
Then
web.show_document (
'http://'
|| :parameter.host
|| ':'
|| :parameter.port
|| '/reports/rwservlet/getjobid'
|| report_job_id
|| '?server='
|| :parameter.r_server,
'_blank'
);