Adding a Document Map

Adding a Document Map


You can use a document map in a report to provide users with a way to navigate to certain areas of the report. When you view a report that includes a document map, a separate side pane appears next to the report. Report sections and groups are arranged in a hierarchy of links. Clicking items in the document map refreshes the report and displays the area of the report that corresponds to the item in the document map.

The document map is intended for use in the HTML rendering extension. Other rendering extensions have different ways of articulating a document map:


  • PDF renders a document map as the Bookmarks pane.
  • Excel renders a document map as a named worksheet that includes a hierarchy of links. Report sections are rendered in separate worksheets that are included with the document map in the same workbook.
  • Word includes a document map as the table of contents.

  • TIFF, XML ,and CSV ignore document maps.

For more information, see Comparing Interactive Functionality for Different Report Rendering Extensions.


To create a document map, add document map labels to those report items that should appear in the map, such as report items and groups. If any report items have a value set for the document map label, a document map is automatically generated when a user views the report.


To toggle the document map on and off, use the Document Map button on the report viewer toolbar. For reports rendered in HTML, you can specify whether to show the document map or not when the report is opened via a URL. The following example initially hides the document map for the report DocumentMapReport:



http://localhost/ReportServer/Pages/ReportViewer.aspx?%2fDocumentMapReport&rs:Command=Render&rc:DocMap=False



How to: Add Items to a Document Map (Reporting Services)

A document map provides a set of navigational links to report items in the rendered report. A user can click links in the document map to jump to the report page that displays that item.


To add links to the document map, you set the DocumentMapLabel property of the report item to text that you create or to an expression that evaluates to the text that you want display in the document map. You can also add the unique values for a table or matrix group to the document map. For example, for a group based on color, each unique color is a link to the report page that displays the group instance for that color. For nested groups, the document map displays the group values in a hierarchy.


You can also create a URL to a report that overrides the display of the document map, so that you can .run the report without displaying the document map, and then click the Show/Hide button on the report viewer toolbar to toggle the display.



To add a report item to a document map
  1. In Design view, make sure the Properties pane is visible. Click the report item such as a table, matrix, or gauge that you want to add to the document map. The report item properties appear in the Properties pane.

    In the Properties pane, type the text that you want to appear in the document map in the DocumentMapLabel property, or enter an expression that evaluates to a label. For example, type Sales Chart.

  2. Repeat step 1 for every report item that you want to appear in the document map.
  3. Click Preview. The report runs and the document map displays the labels you created. Click any link to jump to the report page with that item.


add unique group values to a document map

  1. In Design view, select the table, matrix, or list that contains the group that you want to display in the document map. The Grouping pane displays the row and column groups.


  2. In the Row Groups pane, right-click the group, and then click Edit Group. The Generalpage of the Tablix Group Properties dialog box opens.
  3. Click Advanced.

  4. In the Document map list box, type or select an expression that matches the group expression.

  5. Click OK.

  6. Repeat steps 1-4 for every group that you want to appear in the document map.

  7. Click Preview. The report runs and the document map displays the goup values. Click any link to jump to the report page with that item.

To hide the document map when you view a report
  1. In Report Manager, browse to the report that has the document map.
    For example, for the AdventureWorks sample reports, the following URL specifies the report named Product Catalog.
    http://localhost/Reports/Pages/Report.aspx?ItemPath=%2fAdventureWorks+Sample+Reports%2fProduct+Catalog


  2. Copy the report path on the server. In the example, the report path is %2fAdventureWorks+Sample+Reports%2fProduct+Catalog.

  3. Create a new URL with the following three components:
    The report viewer on the report server: http://localhost/ReportServer/Pages/ReportViewer.aspx?


    • The name of the report you copied in step 1, for example: %2fAdventureWorks+Sample+Reports%2fProduct+Catalog

    • The device information parameters that specify hiding the document map: &rs%3aCommand=Render&rc%3aFormat=HTML4.0&rc%3aDocMap=False

    The following URL consists of these three components appended in the order they are listed.
    http://localhost/ReportServer/Pages/ReportViewer.aspx?
    %2fAdventureWorks+Sample+Reports%2fProduct+Catalog
    &rs%3aCommand=Render&rc%3aFormat=HTML4.0&rc%3aDocMap=False
    To use this URL, copy it and remove all line breaks.

  4. Paste the URL in Report Manager, and then press ENTER. The report runs, and the document map is hidden.