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.
Note: Regardless of the order in which the report sections are formatted, the output order (that is, visual order) is unchanged: Header section, followed by Main section, followed by Trailer section.
The format order can be set in either of the following ways:
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 detailed examples of creating a TOC for a report, see the following chapters
in the Oracle Reports Building Reports manual, available on the Oracle
Technology Network Oracle Reports Documentation page (http://www.oracle.com/technology/documentation/reports.html
):
Building a Paper Report with a Simple Table of Contents and Index
Building a Paper Report with a MultiLevel Table of Contents
A note about page numbering:
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:
Header |
Main |
Trailer |
||||||||||
12 |
13 |
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
Adding a table of contents to a report
Copyright © 1984, 2005, Oracle. All rights reserved.