ActiveReports 12
ActiveReports 12 > ActiveReports User Guide > Concepts > Page Report/RDL Report Concepts > Toolbox > TableOfContents

The TableOfContents report control is used to display the document map, an organized hierarchy of the report heading levels and labels along with their page numbers, in the body of a report. The TableOfContents control allows you to quickly understand and navigate the data inside a report in all viewers that are supported in ActiveReports. Unlike the Document Map that is only available in the Viewers and cannot be rendered or printed, you can use the TableOfContents control to embed the TableOfContents structure in the report body for printing and rendering purposes. You can add a TableOfContents report control to a report by dragging it from the toolbox and dropping it onto the report design surface

In the Properties Window, there are a number of properties that you can use to control the appearance and behavior of the TableOfContents report control. For example, you can use the OverflowName property to specify the OverflowPlaceHolder control name to link it with the TableOfContents control. The FixedHeight property allows you to set the maximum height of the TableOfContents control on each page, similar to the FixedSize property that is available with other report controls. The StyleName property allows you to apply the selected styles from a style sheet. These styles can be applied to the TableOfContents report control using the StyleName property or to Table Of Contents levels using the LevelDesigner Collection Editor dialog. For more information on how to set styles, see Add TableofContents.

The Levels property contains the collection of TableOfContents levels and allows you to access the LevelDesigner Collection Editor dialog, where you can set up the report TableOfContents levels and their properties. The MaxLevel property restricts the maximum number of levels in the document map.

Any customization made to the Document Map like setting Numbering Style for document map levels using the Report dialog or using the DocumentMap property gets directly applied to the TableOfContents control. For more information, see Add Items to the Document Map.

Table Of Contents properties Dialog

Properties for the TableOfContents are available in the Table Of Contents dialog. To open it, with the TableOfContents control selected on the report, under the Properties Window, click the Property dialog link.

The Table Of Contents Properties dialog lets you set properties on the report control with the following pages.

Note: You can click <Expression...> in many of these properties to open the Expression Editor where you can create an expression to determine the value.


Name: Enter a name for the table of contents that is unique within the report. This name can be called in code. You can only use underscore (_) as a special character in the Name field. Other special characters such as period (.), space ( ), forward slash (/), back slash (\), exclamation (!), and hyphen (-) are not supported.

Tooltip: Enter the value or expression you want to display when a user hovers the cursor over the TableOfContents in the viewer at run time. 


By default, the TableOfContents is visible when the report runs, but you can hide it, hide it only when certain conditions are met, or toggle its visibility with another report control.

Initial visibility

Visible: The TableOfContents is visible when the report runs.

Hidden: The TableOfContents is hidden when the report runs.

Expression: Use an expression with a Boolean result to decide whether the TableOfContents is visible. True for hidden, false for visible.

Visibility can be toggled by another report control: Select this check box to display a toggle TableOfContents next to another report control. This enables the drop-down box where you can specify the TextBox control which, if clicked, toggles the visibility of the TableOfContents.



Style: Select a style for the border.

Width: Enter a value in points to set the width of the border.

Color: Select a color to use for the border, or select the <Expression...> option to open the Expression Editor and create an expression that evaluates to a .NET color.


Color: Select a color to use for the background.

Data Output

Element name: Enter a name to be used in the XML output for the TableOfContents report control.

Output: Choose Auto, Yes, No to decide whether to include this TableOfContents in the XML output. Choosing Auto exports the contents of the TableOfContents report control.

LevelDesigner Collection Editor

The LevelDesigner Collection Editor is used to set up the report TableOfContents levels and their properties. To access the LevelDesigner Collection Editor dialog, go to the Properties Window and in the Levels property, click (Collection).

You can set the TableOfContents level properties from the following locations:

The LevelDesigner Collection Editor lets you set the properties of a TableOfContents level as follows.


BackgoundColor: Select a color to use for the background of the TableOfContents level.

Color: Select the color of the text.

Font: Select the font to render the TableOfContents level text.

Style: Choose Normal, Italic or select the <Expression...> option to open the Expression Editor and create an expression.

Family: Choose the font family name.

Size: Choose the size in points for the font.

Weight: Choose from Lighter, Thin, ExtraLight, Light, Normal, Medium, SemiBold, Bold, ExtraBold, Heavy, and Bolder, or select the <Expression...> option to open the Expression Editor and create an expression.

Padding: Specify left, right, top and bottom values for the padding to apply to a TableOfContents level.

StyleName: Select a style to apply to the TableOfContents level.

TextAlign: Specify the horizontal alignment of the text.

TextDecoration: Choose from None, Underline, Overline, and LineThrough, or select the <Expression...> option to open the Expression Editor and create an expression. 


DataElementName: Enter a name to be used in the XML output for this TableOfContents level.


DisplayFillCharacters: Specifies whether to display a leading character. The Default value is True.

DisplayPageNumber: Specifies whether to display a page number. The Default value is True.

FillCharacter: Use the expression to specify a fill character for a leading character.


TextIndent: Specify the text indent.


Name: Specify a name for the TableOfContents level.

See Also