Run Your Multilevel Table of Contents Report to Paper

36-10 Oracle Reports Users Guide to Building Reports

36.7 Summary

Congratulations You have successfully created a report with a multilevel table of contents. You now know how to: ■ create a multilevel table of contents for a large paper report. ■ Use the SRW.SET_FORMAT_ORDER built-in procedure to change the order in which the report sections are formatted. ■ create a format trigger that fetches the page numbers for categories and subcategories that you specify. ■ use the Report Block Wizard to create a simple group above report layout to display your table of contents. For more information on any of the wizards, views, or properties used in this example, refer to the Oracle Reports online Help, which is available in Oracle Reports Builder or hosted on the Oracle Technology Network OTN, as described in Section 4.1.1, Using the Oracle Reports online Help . Note: At this point, you can compare your report against the example file we have provided, multilevel_toc.rdf. First, compile the PLSQL by choosing Program Compile All, then run the report to paper. Bursting and Distributing a Report 37-1 37 Bursting and Distributing a Report Oracle Reports enables you to deliver a single report to multiple destinations simultaneously. By taking advantage of this feature, you can create a single report, then send it in any format layout driven formats, such as PDF or HTML, as well as data model driven formats, such as XML or delimited to multiple destinations. In this example, you will modify a simple report we have provided to burst each group to a separate report. You will then modify a sample distribution XML file to send an e-mail to each destination with an attachment based on the separate reports. You will also send multiple e-mails to the same e-mail address with a single attachment the entire report. Concepts Oracle Reports enables you to deliver a single report to multiple destinations simultaneously. Using the distribution feature, you can set up your report to be distributed to an e-mail destination, a portal, a printer, or anywhere else when the report is run. This feature also enables you to improve performance, since you fetch the data only once for many different formats and destinations. Using distribution also reduces your maintenance overhead because you need only one job request to publish the report to multiple destinations. You can refine this further by sending the Header section to some recipients, the Main section to others, and the entire report to an entirely different recipient list. For more information on bursting and distribution, see Creating Advanced Distributions in the Oracle Fusion Middleware Publishing Reports to the Web with Oracle Reports Services manual, available on the Oracle Technology Network. Example Scenario In this example, you are the report developer for a manufacturing company who needs to deliver monthly information to its warehouses. You will modify an existing report to burst on each warehouse ID, creating separate PDF reports for each warehouse. You will then edit the distribution XML file we have provided to e-mail each report as an attachment to the corresponding warehouses. As you build this example report, you will: ■ Set Up an Existing Report for Bursting on a warehouse group. ■ Edit the Distribution XML Definition . ■ Run the Report to PDF format so that the report is e-mailed to the destinations defined in the distribution.xml file. To see a sample distribution report, open the examples folder named distribution, then open source\inventory_report_dist.rdf for report you will distribute, or 37-2 Oracle Reports Users Guide to Building Reports result\inventory_report_dist.rdf for the report you will burst. For details on how to open these reports, see Accessing the Example Reports in the Preface. The example files used in this chapter are listed and described in Table 37–1 .

37.1 Prerequisites for This Example

To build the example in this chapter, you must have the example files we have provided see Example Scenario , above, as well as access to the Order Entry sample schema provided with the Oracle Database. If you do not know if you have access to this sample schema, contact your database administrator.

37.2 Set Up an Existing Report for Bursting

For the purposes of this chapter, we have provided an RDF file you can use for bursting. In this section, you will set up the report for bursting by deleting the repeating frame and setting the Repeat On property of the Main section, so that the data bursts on each warehouse ID. This way, you can distribute the data for each warehouse as a report to the corresponding warehouse e-mail ID. To set up the report for bursting:

1. In Reports Builder, choose File Open.

2. Navigate to the directory where your examples source files are located, and open the file inventory_report_dist.rdf. The report displays in the Object Navigator. 3. In the Object Navigator, under the report name, double-click the view icon next to the Paper Layout node to display the Paper Layout view. Table 37–1 Example report files File Description distribution\source\ distribution.xml The XML file that controls the distribution properties for your report. distribution\source\ inventory_report_dist.rdf The source report you will modify to burst and distribute. distribution\result\ inventory_report_dist.rdf The modified report you will burst and distribute. distribution\result\REP_.pdf The PDFs that are generated when you distribute and burst your report. Note: The distribution.xml file we have provided for this example is specific to building this example report. A more comprehensive distribution.xml is shipped with Oracle Reports in the ORACLE_HOME\samples\demo directory; you can reuse this file for your own purposes so that you do not have to create one from scratch. Note: For more information on the Repeat On property, refer the Oracle Reports online Help.