Generating PDF output Generating XML output

4-34 Oracle Reports Users Guide to Building Reports

4.7.6 Generating PDF output

To generate PDF output:

1. In the Object Navigator, select or open the report, then click the Run Paper Layout

button in the toolbar to run the report.

2. In the Paper Design view, specify the scope of output you want to display:

■ To display only the current page of the report, choose File Preview Format Current Page . ■ To display all pages, choose File Preview Format All Pages. 3. To preview your PDF report output in your Web browser, choose File Preview Format PDF .

4. To save your report output as a PDF file, choose File Generate to File PDF.

See also Section 2.8.10, About PDF output

4.7.7 Generating XML output

In any Oracle Reports-generated XML file, your output mimics the data model; that is, it is structured by groups and columns. Follow the steps below to do any of the following: ■ Generate an XML output file from your current report. ■ Preview the contents of an XML file in a Web browser in conjunction with command line invocation. ■ Change the XML properties that control XML output for the entire report. ■ Change the XML properties that control XML output for a column or group. To generate an XML output file from your current report in Oracle Reports Builder: 1. Optionally, in the Object Navigator, select or open the report, then click the Run Paper Layout button in the toolbar to run the report. Currently, any report style can be generated to XML output, but with limited support for matrix-style reports.

2. Optionally, in the Paper Design view, choose File Preview Format XML to

preview XML data in your default XML viewer for example, your Web browser.

3. Click the report in the Object Navigator, and choose File Generate to File

XML to save the XML output file to the directory of your choice. To generate an XML output file from the command line, then preview the contents of the XML file in a Web browser: 1. On the command line, run your report with the arguments DESFORMAT=XML, DESTYPE=FILE, and DESNAME=filename.XML. 2. Open an XML-supporting Web browser.

3. Choose File Open to navigate to the XML file that you just generated, and

display it in the browser window. Tip: An .XML extension is required by XML-supporting browsers to recognize the format as XML and display it accordingly. How To... 4-35 4. If you make changes to the XML output or regenerate the XML file with the same name, click the Reload button in your browser to view the updated XML output. To change the XML properties of the entire report: 1. In the Object Navigator double-click the properties icon next to the report name to display the Property Inspector.

2. Under XML Settings, set the XML properties as required for this report.

To change the XML properties of a column or group: 1. In the Data Model view, double-click the column or the title bar of the group to display the Property Inspector.

2. Under XML Settings, set the XML properties as required.

Usage notes ■ Oracle Reports Builder creates well-formed XML output. This means that there is an XML Declaration present in the prolog of the XML document, but not necessarily a DTD document type definition. If you wish to create valid XML, you must add the DTD in the XML Prolog Value property field at the report level. ■ For a report developed in a release prior to Oracle Reports 10g Release 2 10.1.2 patch 2, you may encounter the following issue when saving the report in XML format: if the report defines a PLSQL package, the package specification, and sometimes the body, is not saved in the XML report. To resolve this issue, perform either of the following steps: – If the RDF exists, regenerate the XML output file using Oracle Reports 10g Release 2 10.1.2 patch 2 or later. – If the RDF does not exist, edit the XML to manually to add type=packageSpec andor type=packageBody to the function element, as shown in the following example: programUnits function name=a type=packageSpec textSource [CDATA[ PACKAGE a IS function lire return date ; END a; ]] textSource function function name=a type=packageBody textSource [CDATA[ PACKAGE BODY a IS function lire return date is c2 date; begin c2 :=sysdate; return c2; end; END; ]] textSource function function name=cf_1formula returnType=date textSource 4-36 Oracle Reports Users Guide to Building Reports [CDATA[ function CF_1Formula return Date is aa date; begin --aa :=a.lire; end; ]] textSource function programUnits ■ If your report includes a graph, the graph information will not be saved in the XML file XML is text-based output, which means images are not included. See also Section 2.8.7, About XML in reports Topic Oracle Reports XML tags in the Reference section of the Oracle Reports online Help. Chapters Creating Advanced Distributions and Customizing Reports with XML in the Oracle Fusion Middleware Publishing Reports to the Web with Oracle Reports Services manual.

4.7.8 Generating RTF output