ActiveReports 9 > ActiveReports User Guide > Concepts > Page Report/RDL Report Concepts > Toolbox > TableOfContents |
The TableOfContents (ToC) 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 ToC 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 (ToC) report control. For example, in case of Page Report you can use the OverflowName property to specify the OverflowPlaceHolder control name to link it with the ToC control. The FixedHeight property allows you to set the maximum height of the ToC control on each page, similar to the FixedSize property that is available with other report controls.
The Levels property contains the collection of ToC levels and allows you to access the LevelDesigner Collection Editor dialog, where you can set up the report ToC 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 ToC control. For more information, see Add Items to the Document Map.
Properties for the TableOfContents are available in the ToC dialog. To open it, with the TableOfContents control selected on the report, under the Properties Window, click the Property dialog link.
The ToC 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. |
General
Name: Enter a name for the table of contents that is unique within the report. This name can be called in code.
Tooltip: Enter the value or expression you want to display when a user hovers the cursor over the ToC in the viewer at run time.
Visibility
By default, the ToC 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 ToC is visible when the report runs.
Hidden: The ToC is hidden when the report runs.
Expression: Use an expression with a Boolean result to decide whether the ToC is visible. True for hidden, false for visible.
Visibility can be toggled by another report control: Select this check box to display a toggle ToC 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 TOC.
Appearance
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 ToC in the XML output. Choosing Auto exports the contents of the ToC report control.
The LevelDesigner Collection Editor is used to set up the report ToC 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 ToC level properties from the following locations:
The LevelDesigner Collection Editor lets you set the properties of a ToC level as follows.
Appearance
BackgoundColor: Select a color to use for the background of the ToC level.
Color: Select the color of the text.
Font: Select the font to render the ToC 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 ToC 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.
Data
DataElementName: Enter a name to be used in the XML output for this ToC level.
General
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.
Layout
TextIndent: Specify the text indent.
Misc
Name: Specify a name for the ToC level.