Oracle 10G Run Report From Forms
Oracle 10G Run Report From Forms
We just moved my development from 8i to 10g and things have overall gone smoother than
expected, as far migrating goes.
I have run in to on brick wall that I just can't seem to pick out just right. I have a form that the
user enters data in to. It then calls a report and gives stats and what-not. Everything worked in 8i.
My code looks much like this:
?
1
2
3
4
5
6 PROCEDURE print_report IS
7 pl_id PARAMLIST := GET_PARAMETER_LIST('pl_bill_report');
report_id Report_Object := FIND_REPORT_OBJECT('GenericControlTotals');
8 v_rep VARCHAR2(100);
9
1 BEGIN
0
1 SET_REPORT_OBJECT_PROPERTY(report_id, REPORT_COMM_MODE, ASYNCHRONOUS);
1 SET_REPORT_OBJECT_PROPERTY(report_id, REPORT_EXECUTION_MODE, RUNTIME);
1 SET_REPORT_OBJECT_PROPERTY(report_id, REPORT_DESTYPE, CACHE);
2
ADD_PARAMETER(pl_id, 'p_bill_date', TEXT_PARAMETER, TO_CHAR(:bill_date,
1 'MM/YY'));
3 ADD_PARAMETER(pl_id, 'p_ctr_key', TEXT_PARAMETER, :ctr_key);
1 ADD_PARAMETER(pl_id, 'p_process_name', TEXT_PARAMETER, :p_process_name);
4
1 v_rep := RUN_REPORT_OBJECT(report_id, pl_id);
5
1
6
1
7
The only major difference is that report_destype used to be SCREEN, but in 10g you can only
use CACHE or FILE.
With Cache nothing happens. If I do file and give it a destination it creates the PDF, but the PDF
is 0 bytes.
If I run the Report manually in Reports Builder with paper layout everything works just fine.
I have spent hours reading over »www.oracle.com/technology/produc···w10g.pdf but don't see
that I have missed anything.
Course Outline
• Paper design and web layout actions, from the command line, pass a
parameter to a report, generate report output
• Creating a tabular report, the Report Wizard, report choices and style, data
source type and definition, displayed fields in the report, add summaries,
modify labels, report templates and viewer
• Create a master group, query, group fields, create a detail group in the
wizard, data model for a single report, and a master detail report, layout for a
group left report, create a detail group manually, data model for a group
above report, repeating frames, page number and date/time in a report
• Create a form letter, query, text, add boilerplate in the layout, explore the
margin section, import an image
• Create mailing labels, and query, add boilerplate to mailing labels, repeat
frames in multiple directions, Frame Property Inspector
• Create a form-like report, form report query and labels, a field in the paper
payout, field property Inspector, toolbars in the layout, create report
documentation
• Creating a matrix group report, matrix group query, rows, columns, cell
fields, summaries, labels, data model, output, layout, create a nested matrix
report, add matrix summaries in the data model
• The Graph Wizard, select the graph type and position the graph, choose the X
or Y axis, graph layout, titles, legend, options, output, property inspector,
hyperlinks
• Send a message, run a report in the background, set field values, perform
SQL statements, set formatting
• Generate XML output, report definition tags, partial and complete XML report,
run an XML report, apply and XML format