|
|
|
Re: How to run report in oracle form 12c [message #663218 is a reply to message #662580] |
Fri, 26 May 2017 01:26 ![Go to previous message Go to previous message](/forum/theme/orafaq/images/up.png) ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
![](http://www.gravatar.com/avatar/07a2d5ed3635591a825e305486f539ff?s=64&d=mm&r=g) |
Tanishq
Messages: 1 Registered: May 2017
|
Junior Member |
|
|
hello ,
I have code for calling report on 12c
firstly create a button
on when-button-pressed trigger
copy below code:
DECLARE
pl_id Paramlist;
pl_name varchar2(20):= 'tempdata';
v_report_id report_object;
vc_rep_status varchar2(200);
vc_ReportServerJob varchar2(100);
vjob_id varchar2(200);
begin
pl_id := get_parameter_list(pl_name);
if not id_null (pl_id)
then
destroy_parameter_list(pl_id);
end if;
pl_id := create_parameter_list(pl_name);
v_report_id :=find_report_object('report_name');
SET_REPORT_OBJECT_PROPERTY(v_report_id,REPORT_DESFORMAT,pdf);
SET_REPORT_OBJECT_PROPERTY(v_report_id,REPORT_DESTYPE, cache);
SET_REPORT_OBJECT_PROPERTY(v_report_id,REPORT_COMM_MODE, SYNCHRONOUS);
SET_REPORT_OBJECT_PROPERTY(v_report_id,REPORT_SERVER,'report_server_name');
SET_REPORT_OBJECT_PROPERTY(v_report_id,REPORT_OTHER,'PARAMFORM=NO');
vc_ReportServerJob := run_report_object('report_name');
vjob_id := substr(vc_ReportServerJob,instr(vc_ReportServerJob,'_',-1)+1); --
vc_rep_status := report_object_status(vc_ReportServerJob);
if vc_rep_status = 'FINISHED'
then
web.show_document('http://192.168.100.222:9002/reports/rwservlet/getjobid'||vjob_id||'?server=my_server1');
else
message('Report failed with error message '|| vc_rep_status);
end if;
end;
Note:
-you should know report server port no. and url and report server name
-you need to attach created report on form and that report name you have call in RUN_REPORT_OBJECT
I HAVE ATTACHED FORM BY USING IT YOU LL DEFINATELY UNDERSTAND THE CALLING PROCESS
-
Attachment: MODULE1.fmb
(Size: 48.00KB, Downloaded 5081 times)
|
|
|
|
|
|