From: David Schmoldt
To: Multiple recipients of list ODTUG-DEV2K-L
Subject:
RE: Oracle Dev-suite Release 2 "Reports Parameters configurations"
I can verify that using the RUN_REPORT_OBJECT_PROC as a
replacement for RUN_REPORT_OBJECT, as described in that white paper, works
great. I highly recommend it.
Overall, using the RUN_REPORT_OBJECT_PROC allowed us to
transition a lot of 6i Client/Server reports to 10gAS without having to do any
re-writes on the reports themselves. Just minor changes to the calling
form.
You basically replace calls to RUN_REPORT_OBJECT with calls
to RUN_REPORT_OBJECT_PROC, and the RUN_REPORT_OBJECT_PROC procedure supplied in
the white paper takes it from there. It deals with the hidden HTML
parameters, then calls RUN_REPORT_OBJECT internally, and finally displays the
report using WEB.SHOW_DOCUMENT.
We have a core PL/SQL library that we attach to most of our
forms, and we added RUN_REPORT_OBJECT_PROC to that
library.
Using PARAMFORM=YES, you end up with an auto-generated HTML
parameter page that matches the old Reports parameter page very closely .. same
boilerplate text, same populated dropdowns, etc. Fill in the parameters,
hit the SUBMIT button, and the parameters are passed on to the report. No
need to change the actual report.
SInce you can no longer do a 6i Preview, we
now generate the document as a PDF, instead of the Reports 6i Preview
option. The PDF report is "previewed" in the browser by
WEB.SHOW_DOCUMENT. Once the PDF is displayed in the browser, the user
can print to a local printer, or save the PDF file to their local PC, so that
was a smooth transition for the user who was used to the 6i Preview
mode.
Since seeing code is always easier....
A sample Forms trigger using the procedure to call a report
WITHOUT a parameter form:
declare
rep_id report_object;
params
VARCHAR2(1000);
begin
rep_id :=
find_report_object('TRINA_PROJ_DETAIL');
params := 'paramform=no';
params := params || ' in_proj_id=' ||
:trina_projects.proj_id;
set_report_object_property(rep_id,report_execution_mode,RUNTIME);
set_report_object_property(rep_id,report_comm_mode,SYNCHRONOUS);
RUN_REPORT_OBJECT_PROC(
rep_id,
'rep_GFC27_oracleas1', -- our reports
server
'PDF',
CACHE,
'H:\apps\prod10\exe\Trina_Proj_Detail.rdf',
params,
'/reports/rwservlet');
synchronize;
end;
A
sample Forms trigger to call a report that will produce a parameter
form:
declare
rep_id
report_object;
params VARCHAR2(1000);
begin
rep_id :=
find_report_object('TRINA_TIMESHEET_HOURS');
params := ' paramform=yes';
set_report_object_property(rep_id,report_other,params);
set_report_object_property(rep_id,report_execution_mode,RUNTIME);
set_report_object_property(rep_id,report_comm_mode,SYNCHRONOUS);
RUN_REPORT_OBJECT_PROC(
rep_id,
'rep_GFC27_oracleas1',
'PDF',
CACHE,
'H:\apps\prod10\exe\Trina_Timesheet_hours.rdf',
params,
'/reports/rwservlet');
synchronize;
end;