The Document Map in SSRS provides the navigation links in the report preview. The user can use these links to navigate between multiple reports or between pages.
Document Map in SSRS Example
In this example, we will show you, How to create or Enable Document Map Labels in SQL Server Reporting Services with an example.
SELECT Territory.SalesTerritoryCountry AS Country, Prodcat.EnglishProductCategoryName AS [Product Category], prodSubcat.EnglishProductSubcategoryName AS [Product SubCategory], prod.EnglishProductName AS [ProductName], SUM(fact.SalesAmount) AS Sales, SUM(fact.TaxAmt) AS Tax FROM dbo.DimProduct as prod INNER JOIN dbo.DimProductSubcategory AS prodSubcat ON prod.ProductSubcategoryKey = prodSubcat.ProductSubcategoryKey INNER JOIN dbo.DimProductCategory AS Prodcat ON prodSubcat.ProductCategoryKey = Prodcat.ProductCategoryKey INNER JOIN dbo.FactInternetSales AS fact ON fact.ProductKey = prod.ProductKey INNER JOIN DimSalesTerritory AS Territory ON fact.SalesTerritoryKey = Territory.SalesTerritoryKey GROUP BY Territory.SalesTerritoryCountry, prod.EnglishProductName, prod.Color, Prodcat.EnglishProductCategoryName, prodSubcat.EnglishProductSubcategoryName
In reporting services, We can enable the Document Map in three ways:
The first approach to Enable Document Map in SSRS
First, Select the column and Right click on the column to open the context menu. From the context menu, Please select the Row Group option and then select the Group Properties.. option as shown below
The Second approach to Enable Document Map in SSRS
The second method, Go to Row Groups pane and right-click on the column name to open the context menu. From the context menu, Please select the Group Properties.. option as shown below
Once you selected the Group Properties.. option, a new window will be opened to configure the group properties.
Please navigate to Advanced Tab and select the column name under the Document map property as shown below. These column values will be displayed as Document map output
Click Ok to finish configuring the SSRS Document Map Label property. Let us click the preview button to see the report preview
From the above screenshot, you can observe that report preview is displaying a separate tab with countries list. If you click on any country name, the report server will navigate to that country name. For instance, below screenshot is displaying the results of Germany country.
Though we added a document map for countries list, we are unable to navigate this large report. Let’s add Product Category to the document map label as well
Now if you observe the below screenshot, you can see the better navigations. It looks like a PDF file with an index on the left side
We used the above steps to Configure Document Map label property on our previously created Subreports also. Please refer SSRS Subreports article to understand the Subreport design and configurations.
Document Map in SSRS at Tablix level
In real-time, we may see multiple tables or multiple tablix will be embedded in the single report. If this is the case, it will be very difficult to navigate between two tables. In these situations, we can use the SSRS Document Map Property at tablix level for better navigation.
For better understanding, We will show you one example. If you observe the below screenshot, we added one more table to the First example
First, Select the first table and go to the Tablix properties. Within the properties pane, Please select the DocumentMapLabel property and assign a Unique name to it. From the below screenshot you can observe that We assigned Country Sale
Next, Select the second table and go to the Tablix properties. Within the properties pane, Please select the DocumentMapLabel property and assign Unique name to it. From the below screenshot you can observe that We assigned Product Sale
Click the Preview tab to see the report Preview. If you observe the below screenshot, Report manager is displaying the Document map labels of two tables
If you want to see the second table, Just click on Product Sale label as shown below
Thank You for Visiting Our Blog