To create a table of contents (TOC) for a report, you can use the Format Order of Sections property or the SRW.SET_FORMAT_ORDER built-in procedure to format the Main section of the report 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 Content
Copyright © 1984, 2005, Oracle. All rights reserved.