Report Table of Contents

Description

A live table of contents can be integrated into a report. Table of contents are fully customizable, allowing you to control both the contents and appearance of the table of contents.

Discussion

The table of contents appears before the report body and lists the page number for each entry. Entries are fully customizable as is the appearance of the table of contents.

images/toc.png

The Define Table of Contents menu option under the Report menu is used to add a table of contents to a report.

images/tocMenu.png

In the table of contents builder, you will see several report sections listed that can be included in the table of contents. Each report section can have a Table of Contents entry expression that defines the entry in the table of contents.

images/defineToc.png

The report sections that can be included in a table of contents will be displayed in the Report Sections list. Report sections include:

Report Section
Description
Grand

The "Grand" section is the page header and footer.

Detail

The "Detail" section refers to each detail entry, which is typically repeated for each report record.

Group Break

If the report contains one or more group breaks, an entry for each break will be listed. For example, if a report contains group breaks for each invoice number, then a Table of Contents entry can be defined for the invoice number.

For each Report Section, you can define the following properties:

Property
Description
Table of Contents entry expression

An expression that generates the text shown in the table of contents.

Target object

Object in the report that receives focus when the user clicks on the entry in the table of contents.

Every time a record in a report section is printed, the Table of Contents entry expression is evaluated and a new entry is inserted into the table of contents. The text shown in the table of contents is the result of the expression.

When an entry in the table of contents is clicked, the corresponding page where the object is located is shown and the focus is given to the defined Target object.

Customizing the Table of Contents Appearance

The table of content's appearance can be customized by creating a special type of report called a Table of Contents Report. The custom Table of Contents Report is built using the report builder. Any formatting or styling tools available in the report builder can be used to customize the table of content's appearance.

To create a customized table of contents, click the Add new custom 'Table of Contents' Report link at the bottom of the Define Table of Contents for Report dialog. When prompted, specify a name for the new Table of Contents Report and click OK. Alpha Anywhere will open the report builder, which can be used to customize the table of contents. When you are satisfied with your changes, save and close the report.

images/createCustomToc.png

After the custom table of contents has been created, it can be added to the report. Open the Define Table of Contents dialog. In the Custom 'Table of Contents' Report dropdown, choose the table of contents report you created then click OK to save your changes.

images/customtoc.png

Where to Store a Custom Table of Contents Report

When you create a Table of Contents Report, you can store it in one of two locations:

Location
Description
Global Dictionary

The Table of Contents Report will be saved in the global report dictionary.

Local Dictionary

The Table of Contents Report will be saved in a local report dictionary (required for web applications)

If the Table of Contents Report is stored in the global dictionary, it can be used in other reports that you have created.

If stored in a local dictionary, the Table of Contents Report can only be referenced by the report used to create it.

If a report will be used in a web application, the Table of Contents Report must be stored in a local dictionary. Desktop applications support storing Table of Contents Reports in both local and global dictionaries.

images/tocLocation.png

Getting the Total Page Count of the Parent Report in a Custom Table of Contents

It may be desireable to display or use the total number of pages in a report in the table of contents layout. A calculated field can be used to display the total number of pages in the report. The *parent_report_pagecount() function is used to fetch the total number of pages in the parent report. For example:

toc_pageCount = *parent_report_pagecount()

If the report contains a table of contents or index, the pages for these sections are not included in the page count for the parent report.

Videos

Reports - Table of Contents, Bookmarks and Index

A Table of Contents, Bookmarks, or Index can be added to a report using the report builder. You can completely customize the entries that are made in the Table of Contents, Bookmark section, and Index. In addition, you can completely customize the layout of the Table of Contents section and Index section.

The entries that appear in the Table of Contents, Bookmark section, and Index are "live" - if you click on an entry, you will be navigated to the appropriate page in the report. In addition, when you print the report to a PDF file, the Table of Contents, Bookmarks, and Index are live.

Limitations

Freeform and Layout Table Reports Only

See Also