[Expand]General Information
[Expand]WinForms Controls
[Expand]ASP.NET Controls and MVC Extensions
[Expand]ASP.NET Bootstrap Controls
[Expand]ASP.NET Core Bootstrap Controls
[Expand]WPF Controls
[Expand]Xamarin Controls
[Expand]Windows 10 App Controls
[Expand]Office File API
 [Expand]Product Information
 [Expand]Get Started with DevExpress Reporting
 [Expand]Create Popular Reports
 [Collapse]Detailed Guide to DevExpress Reporting
   Introduction to Banded Reports
  [Expand]Provide Data to Reports
  [Collapse]Use Report Controls
    Add Controls to a Report
    Manipulate Report Controls
   [Collapse]Use Basic Report Controls
     Character Comb
     Rich Text
     Check Box
     Picture Box
     Zip Code
     Page Break
     Table of Contents
     Page Info
   [Expand]Use Tables
   [Expand]Use Bar Codes
   [Expand]Use Charts and Pivot Grids
   [Expand]Use Gauges and Sparklines
   [Expand]Drawing Lines and Shapes
   [Expand]Using Custom and Third-Party Controls
  [Expand]Shape Report Data
   Lay out Dynamic Report Contents
  [Expand]Customize Appearance
  [Expand]Add Navigation
  [Expand]Provide Interactivity
  [Expand]Add Extra Information
  [Expand]Merge Reports
  [Expand]Use Expressions
  [Expand]Store and Distribute Reports
  [Expand]Reporting API
 [Expand]Visual Studio Report Designer
 [Expand]Create End-User Reporting Applications
 [Expand]API Reference
[Expand]Report and Dashboard Server
[Expand]eXpressApp Framework
[Expand]eXpress Persistent Objects
[Expand]CodeRush Classic
[Expand]Cross-Platform Core Libraries
[Expand]Tools and Utilities
 End-User Documentation
View this topic on docs.devexpress.com (Learn more)

Table of Contents

This document describes how to insert a table of contents into a document by using a dedicated report control.

Expanded Table of Contents Overview

Once bookmarks have been assigned to specific report elements, you can generate a table of contents that displays page numbers containing the elements included into the document map.

The following image illustrates the difference in displaying information by a table of contents within a report and in a published document.

To implement a table of contents, drop the XRTableOfContents control from the Toolbox DX.18.2: Report Controls tab onto the report surface. If the report does not contain a Report Header at the moment, it will be created automatically so that the table of contents can be added to it.

Expanded Table of Contents Structure

The table of contents contains the following elements.

  1. A title (corresponding to the XRTableOfContentsTitle class) that displays text and formatting options specified by the XRTableOfContents.LevelTitle property.
  2. One or more document levels (corresponding to the XRTableOfContentsLevel class) that provide individual formatting settings to specific nodes of a document map's tree.

    To access the collection of levels, use the XRTableOfContents.Levels property.

    Unless levels have been added to a table of contents, a single default level is used to provide common settings to the elements of a document map for which no specific level has yet been assigned.

Expanded Managing Document Levels

To add a new level to the table of contents, do the following.

  1. Select the table of contents and click its smart tag.

    In the invoked actions list, click the ellipsis button for the Levels property.

  2. In the invoked collection editor, click Add.

  3. Specify the formatting settings for the created level and click OK to exit the dialog.

To customize the indentation settings of a document level, use its XRTableOfContentsLevel.Indent property. A zero value assigned to this property assumes the default indent settings.

Is this topic helpful?​​​​​​​