About format order Output Formats and Capabilities

Advanced Concepts 2-57 ■ About Enhanced Spreadsheet output ■ About text output ■ About creating an ASCII character-mode report

2.8.1 About format order

In prior releases, Oracle Reports formatted the sections of a report in sequential order: Header section, followed by Main section, followed by Trailer section. This release introduces the capability to change the order in which the three sections of a report are formatted. The format order can be set in either of the following ways: ■ Format Order of Sections property ■ SRW.SET_FORMAT_ORDER built-in procedure if defined, overrides the Format Order of Sections property setting This feature is useful for formatting any report section first to retrieve information that is known only at the time of formatting, such as page numbers, then using that information in the formatting of a previous section. For example, to create a table of contents TOC for a report, you can format the Main section first and use report triggers to build a table containing the TOC entries. When the first element for the TOC is formatted, a trigger fires and creates a row in the TOC table containing the TOC entry and the page number. After the Main section has completed formatting, the format order setting can define that the Header section is formatted next. The Header section can contain a report block based on the TOC table. After formatting, you can output your report with a TOC the Header section, followed by the report body the Main section, followed by the Trailer section. For the steps to create a TOC for a report, see the example reports in Chapter 35, Building a Paper Report with a Simple Table of Contents and Index and Chapter 36, Building a Paper Report with a Multilevel Table of Contents . A note about page numbering: Note: When you run a report to preview format, empty browser windows are launched to display the output. To avoid opening such empty browser windows, complete the following steps in Internet Explorer 7: 1. From the Internet Explorer Tools menu, select Internet Options 2. Go to the General tab Tab Settings. 3. From the Open Links from Other Programs in section, select the Current tab or Window radio button. 4. Click OK. If you are using browsers other than Internet Explorer, read their help information to modify this setting. Note: Regardless of the order in which the report sections are formatted, the output order is unchanged: Header section first, then Main section, then Trailer section. 2-58 Oracle Reports Users Guide to Building Reports The page numbering of a report follows the format order. For example, in a report with a Header section of 2 pages, a Main section of 8 pages, and a Trailer section of 3 pages, with Format Order set to Main-Trailer-Header, the page numbering will be as follows in the report output: 12, 13 Header pages, which were formatted last, 1, 2, 3, 4, 5, 6, 7, 8, Main pages, which were formatted first 9, 10, 11Trailer pages, which were formatted second.

2.8.2 About batch reporting