This walkthrough illustrates how to create a report that includes the TableOfContents (ToC) control and displays the document map on a report page.
The TableOfContents control allows you to quickly navigate to desired data inside a report. You can use the TableOfContents control to embed the list of contents in the report body for printing and rendering, unlike the Document Map that is only available in the Viewers and cannot be rendered or printed.
When you complete this walkthrough you get a layout that looks similar to the following at design time and at run time.
See Adding an ActiveReport to a Project for information on adding different report layouts.
This walkthrough uses the Movies table from the Reels database. By default, in ActiveReports, the Reels.mdb file is located in the [User Documents folder]\GrapeCity Samples\ActiveReports 11\Data folder.
SQL Query |
Copy Code
|
---|---|
SELECT Genre.GenreName, Movie.Title, Movie.YearReleased, Movie.UserRating, Movie.Country FROM Genre INNER JOIN (Movie INNER JOIN MovieGenres ON Movie.MovieID = MovieGenres.MovieID) ON Genre.GenreID = MovieGenres.GenreID ORDER BY YearReleased ASC |
Property Name | Property Value |
---|---|
DataSetName | MovieCatalog |
Location | 0.25in, 1.875in |
Size | 6in, 4in |
PageBreakAtStart |
True
Note: Applicable for RDL reports only.
|
=Fields!GenreName.Value
. Property Name | Property Value |
---|---|
Location | 0.25in, 0.375in |
Font | Normal, Arial, 12pt, Bold |
TextAlign | Center |
Size | 5.625in, 0.25in |
Label |
=Fields!GenreName.Value
Note: Setting the control's Label property adds an entry of the control in the document map.
|
Property Name | Property Value |
---|---|
Location | 0.125in, 1in |
Size | 6in, 0.75in |
DataSetName | MovieCatalog |
BorderStyle | Solid |
RepeatHeaderOnNewPage | True |
Click the adorner to show a list of available fields from the MovieCatalog dataset and add the following fields to the cells of the table details row.
Cell | Field |
---|---|
Left Cell | Title |
Middle Cell | Country |
Right Cell | UserRating |
Property Name | Property Value |
---|---|
Font > FontWeight | Bold |
TextAlign | Left |
BackgroundColor | Silver |
BoderStyle | Solid |
Property Name | Property Value |
---|---|
TextAlign | Left |
BorderStyle | Solid |
=Fields!YearReleased.Value
.Property Name | Property Value |
---|---|
Font | Normal, Arial, 10pt, Bold |
HeadingLevel |
Heading 2
Note: Setting the control's HeadingLevel property adds an entry of the control in the document map.
|
TextAlign | Center |
Value | ="Movies Released in " & Fields !YearReleased.Value |
Property Name | Property Value |
---|---|
Location | 0.25in, 0.5in |
Size | 6in, 0.875in |
BorderStyle | Solid |
Properties
Property Name | Property Value |
---|---|
Font > Size | 14 |
Font > Weight | Bold |
Color | DarkBlue |
Padding > Left | 10pt |
Padding > Top | 10pt |
Padding > Right | 10pt |
Padding > Bottom | 10pt |
Fill character | . |
Properties
Property Name | Property Value |
---|---|
Font > Weight | Bold |
Padding > Left | 20pt |
Padding > Top | 10pt |
Padding > Right | 0pt |
Padding > Bottom | 0pt |
DisplayPageNumber | False |
Properties
Property Name | Property Value |
---|---|
DocumentMap > Source | Labels and Headings |
DocumentMap > NumberingStyle | 1, 2, 3, 4, 5 |
OR