New to Telerik Reporting? Start a free 30-day trial
Create a Feature Report with a Custom TOC Level
Environment
| Product | Progress® Telerik® Reporting |
| Product Version | 2026 Q1 (20.0.26.402) and later |
| Report Designer | Standalone Report Designer or Visual Studio Report Designer |
Description
Create a simple feature report that demonstrates how TocLevel controls the TOC hierarchy independently from the default report structure.
The walkthrough uses static content so that you can reproduce the result without a custom data source.
Solution
Use this procedure:
- Create a new blank report.
- Add a Table of Contents section from the report context menu.
- In the Properties pane of the TOC section, open the
Levelseditor and add three levels. - In the report Detail section, add three TextBox items and set these values:
TextBoxCountry:Value:CountryTocText:Country
TextBoxCity:Value:CityTocText:City
TextBoxStore:Value:Store NameTocText:Store Name
- Preview the report and verify that the TOC order follows the default hierarchy and item order.
- Return to design view and set explicit TOC levels:
TextBoxCountry->TocLevel = 1TextBoxStore->TocLevel = 2TextBoxCity->TocLevel = 3
- Preview the report again and verify that the TOC now uses the custom level mapping.
The following structure is expected after the override:
text
Level 1
└─ Country
Level 2
└─ Store Name
Level 3
└─ City
TocLevelhas effect only whenTocTextis set on the same report item, section, or group.
TocLevelmust evaluate to an integer that is greater than or equal to1.