ActiveReports 9
Add TableOfContents

The TableOfContents control allows you to display the document map, an organized hierarchy of the report bookmark labels and heading levels along with their page numbers, in the body of a report.

This topic will guide you through the following procedures:

To add items to the Document Map using HeadingLevel Property

You can define an hierarchical structure for your report using the HeadingLevel property of the TextBox control. For example, you can set the HeadingLevel property of the TextBox displaying the report title to Heading1 and then set the HeadingLevel property of the TextBox displaying a group header to Heading2, this will club all the Heading2 entries under the Heading1 entry in the Document Map.

These steps assume that you have already set the HeadingLevel property of the TextBox controls that your report contains. See, Add Items to the Document Map for more information.

  1. In the Report Explorer, right-click the Report item and select Report Properties...
  2. In the Report Properties dialog that appears, go to the Document Map page.
  3. On the Document Map page, set Source to Headings Only and optionally select the Numbering Style from the dropdown list.
    Tip: You can also set Source to Labels and Headings to include both labels and headings in the Document Map.
  4. Click OK to close the dialog.

To add items to the Document Map using Label Property or Document Map Labels

By setting the Label property or Document Map Label of the controls in your page report/RDL report, you can show a hierarchical structure based on the parent - child relationship between the controls in the Document Map. For example, set the Label property or Document Map Label of a List data region and a TextBox control and then place the TextBox control inside the List data region. When you view the Document Map, the TextBox label appears nested inside the List data region label, thereby displaying a hierarchical structure. Similarly, if you set a Document map label on multiple Groups of a data region, they appear nested below each other in the document map displaying the same hierarchy in which they were set.

These steps assume that you have already set the Label property or Document Map Label of the controls that your report contains. See, Add Items to the Document Map for more information.

  1. In the Report Explorer, right-click the control and select Report Properties...
  2. In the Report Properties dialog that appears, go to the Document Map page.
  3. In the Document Map page, set Source to Labels Only and optionally select the Numbering Style from the dropdown list.
    Tip: You can also set Source to Labels and Headings to include both labels and headings in the Document Map.
  4. Click OK to close the dialog.

To add and configure TableOfContents

Follow these steps to setup the ToC control in the report layout displaying the document map set in the procedures above.

To add a ToC control in Page Report

  1. In the Report designer, click the New tab to add a new page to the report layout.
  2. From the toolbox, drag and drop the TableOfContents control onto Page 1 while use Page 2 to create layout for displaying the main content of the report. Using the same page that contains the ToC may disrupt the flow of data displayed in the report.
  3. On the design surface, select the TableOfContents control and go to the Properties window to set its FixedHeight property. The use of the FixedHeight property is similar to the use of the FixedSize property that is available with other report controls.
    Note: You can also place the OverflowPlaceHolder control and link it with the ToC control using its OverflowName property to display data that does not fit inside the fixed size of the ToC control.

To add a ToC control in Report Definition Language (RDL)

  1. From the toolbox, drag and drop the TableOfContents control onto the report design surface, preferably at the start or end of the report layout to justify the significance of the control.

To configure ToC's Appearance

  1. With the TableOfContents control selected, click the Levels (Collection) property and then click the ellipsis button that appears.
  2. In the LevelDesigner Collection Editor that appears, consider the hierarchy of entries that appear in the Document Map and add as many levels required using the Add button. This allows you to customize entries at different nested levels. Using just a single Level will list down all the ToC entries at the same level. 
  3. Select each level and set its related properties available in the LevelDesigner Collection Editor. These properties could be general properties like DisplayPageNumber or DisplayFillCharacter, or they could be related to the level's appearance like BackgroundColor, Font, Padding etc. These properties directly affect all the entries that appear in the selected level, thereby allowing you to customize them. For information on the important properties of the TableOfContents control, see TableOfContents.
    Note: You can also set various numbering styles for all levels or individual level by setting the Numbering Style for document map levels using the Report dialog or using the DocumentMap property that gets directly applied to the ToC control. For more information see Add Items to the Document Map.
  4. Click OK to close the dialog and return to the design surface.
  5. Go to the Preview Tab to view the Table of Contents appear in the report output.
  6. Click any ToC entry and navigate to that targeted report control in the report.
See Also

Concepts

 

 


Copyright © 2014 GrapeCity, inc. All rights reserved

Support Forum