Create a table in the database to hold the information for the index Create a format trigger

35-14 Oracle Reports Users Guide to Building Reports

3. Click OK.

4. In the new query that displays in the Data Model view, click and drag the INITIAL_LETTER column above the rest of the query, so that the data model now looks like this: Figure 35–11 Data model view of the index 5. Save your report.

35.3.4 Create a report block to display the index in the Trailer section

The steps in this section will show you how to display the index information in the Trailer section of your report. To create a report block in the Trailer section: 1. In the Paper Layout view, click the Trailer Section button in the toolbar.

2. Choose Insert Report Block.

3. On the Style page, select the Group Above radio button, then click Next.

4. On the Groups page, click G_2 the name of the new group that contains the

INITIAL_LETTER column, then click Down to specify the print direction.

5. In the Available Groups list, click G_INITIAL_LETTER, then click Down.

6. Click Next.

7. On the Fields page, click INITIAL_LETTER, then click to move it to the

Displayed Fields list.

8. Move TERM and PAGE to the Displayed Fields list.

9. Click Next, then Next again, then click Finish.

10. Save your report.

35.3.5 Run your report to paper

Click the Run Paper Layout button in the toolbar. The index displays on the last pages of the report. We chose page 2402, which in our example looks like the following: Building a Paper Report with a Simple Table of Contents and Index 35-15 Figure 35–12 Index page of the report

35.4 Summary

Congratulations You have successfully created a report with a table of contents and an index. You now know how to: ■ create a table of contents TOC and index for a large paper report. ■ use the SRW.SET_FORMAT_ORDER built-in procedure to change the order in which the sections of a report are executed. ■ use the SRW.GET_PAGE_NUM built-in procedure to retrieve the page number for a specific record. ■ create a new table in your database to hold the necessary page numbers. ■ create a simple group above report using the Report Wizard. Note: To generate the table of contents TOC, you must click the Run Paper Layout button. If you click the Paper Design view button, the change of format order will not take effect, thus the TOC will not be generated. Note: The data on page 2402 in your report may not appear the same as ours, depending on the amount and type of data you have in the schema.