ActiveReports 9 > ActiveReports User Guide > How To > Page Report/RDL Report How To > Work with Report Controls and Data Regions > 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.
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.
Tip: You can also set Source to Labels and Headings to include both labels and headings in the Document Map. |
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.
Tip: You can also set Source to Labels and Headings to include both labels and headings in the Document Map. |
Follow these steps to setup the ToC control in the report layout displaying the document map set in the procedures above.
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. |
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. |