Document Maps
Document Maps is a powerful feature in SSRS (SQL Server Reporting Services) that helps users to navigate a large report, especially when it contains multiple pages. It provides a table of contents view of the report to the end user which can be used to jump to a specific section of the report.
Syntax
Document Maps can be created by following the below steps:
- Create the report in SSRS.
- Right-click on the rectangle or tablix to which you want to create a Document Map.
- Click on Properties. The Tablix/Rectangle Properties window will open.
- Select Document Map in the left panel of Tablix/Rectangle Properties window.
- Select the Document map label. This can be a field value or an expression which will appear in the table of contents view of the report.
Example
Consider the following example of a sales report with three main sections: Sales by Region, Sales by Product Category, and Sales by Month.
To create a Document Map for the report, follow the below steps:
- Right-click on the Sales by Region table and select Properties.
- Select Document Map in the left panel of the Tablix/Rectangle Properties window.
- Enter a label in the Document map label text box. You can also select an existing field from the drop-down list.
- Repeat the above steps for Sales by Product Category and Sales by Month tables.
The resultant Document Map will appear as shown below:
The end user can click on any of the Document Map links to directly navigate to that specific section of the report.
Explanation
In the example above, the Document Map is created by selecting the table and entering a label for the Document Map label. This label appears in the table of contents-like view generated by the Document Map. The Document Map labels for other tables are also created in a similar way.
Use
Document Maps are very useful in improving the user experience of SSRS reports by providing a quick and easy way for users to navigate to specific sections of the report. This is particularly useful when the report is large and contains multiple sections.
Important Points
- Document Maps can be created at any level in a report, such as tables, matrixes, charts, and even text boxes.
- The Document Map labels can be based on any field value or expression.
- The Document Map labels can be dynamic and change based on user interaction.
Summary
Document Maps in SSRS provide a table of contents-like view of the report, which helps users to navigate a large report, especially when it contains multiple pages. It can be created by selecting a table and entering a label for the Document Map label. Its labels can be based on any field value or expression, and can be dynamic and change based on user interaction.