Bookmarks and Document Map
This topic describes how to create an interactive table of contents (i.e. a Document Map) for your report. It presents the hierarchy of a report's bookmarks in a tree-like form, which helps to navigate through the report in Print Preview.
You can specify a bookmark for any report control. When the report document is created, its Print Preview displays a Document Map (or a table of contents) that reflects the hierarchy of all report bookmarks.
After clicking a bookmark in the Document Map, the Print Preview navigates to the corresponding element in the report document, which makes navigation through reports easier. The Document Map is preserved when exporting a report to PDF.
|
- Create a report with grouping.
- The report should be set up with a Group Header, three controls and a sort as shown in the following images.
- Select the label which is placed in the Group Header band (PROJECT), expand the (DataBindings) property in the Property Grid panel and bind the label's Bookmark property to the PROJECT data field.
- Select the label in the Detail band and bind its Bookmark property to the SITE_ID data field.
- Specify the same label's Bookmark Parent property to make the report's bookmarks hierarchical.
- Select the report itself and assign text to its Bookmark property. This will determine the caption of the root node in the Document Map.
- Switch to the Print Preview tab and view the result as follows.
- Click on the A017 bookmark and notice that you are taken to the corresponding entry in the reports output.
In summary, a control's bookmark is defined by the following properties.
- The Bookmark property that specifies the text of a bookmark. To generate dynamic bookmarks for a control, you can bind this property to a required field from a report's Data Set.
- The Bookmark Parent property that allows you to create a hierarchical (tree-like) structure of bookmarks. By assigning a report control's name to this property, the specified control is shown as a parent node that can be collapsed or expanded in the Document Map's tree.
- The Bookmark property that defines the title of the root bookmark in the Document Map's tree. This bookmark is linked to the beginning of a report's first page. By default a report's Name is used as the root bookmark's title.
Best practice is to rename labels which are used as bookmarks with meaningful names so that it is easy to map the parent bookmarks.
The following is a complete list of controls for which the Bookmark property is available:
- Chart
- Check Box
- Bar Code
- Label
- Page Info
- Panel
- Picture Box
- Pivot Grid
- Rich Text
- Shape
- Table
- Table Cell
- Zip Code