Session 23 : SSRS 2008 R2 Document maps
A document map in an SSRS report, provides pointers/links to certain report items in your report.
If you have a document map in your report, it will appear in the left most pane. Clicking on any of the links, in the document pane, jumps the users directly to the report item.
It is similar to the table of contents.
Please note that clicking on the document map links, refreshes the report.
Lets look at an example for a document map.
Step 1: Create a blank report by connecting to Adventure works database.
I have used the following query to create my dataset:
SELECT Sales.SalesTerritory.Name as Region,
Sales.SalesTerritory.CountryRegionCode,
Sales.SalesTerritory.[Group] as Territory,
Year(Sales.SalesOrderHeader.DueDate) as Year,
Month(Sales.SalesOrderHeader.DueDate) as Month,
Sales.SalesOrderHeader.TotalDue
FROM Sales.SalesTerritory
INNER JOIN Sales.SalesOrderHeader
ON Sales.SalesTerritory.TerritoryID = Sales.SalesOrderHeader.TerritoryID
Order by Sales.SalesTerritory.CountryRegionCode
Your design view after creating the report should look something like this.
Please observe the Row groups.
Adding Territory as a group is necessary here, else SSRS will repeat the Territory values in the document map.
You can hide one of the territory column (the non-group one) in the report.
Next, goto the Territory column, and select the properties.
Go ahead and choose Territory in the DocumentMaps Property:
Now hit preview, and you should be ale to see the follow SSRS 2008 R2 report with a document map:
Select any one Territory in the document map, and the report will jump to the appropriate page.
If you have a document map in your report, it will appear in the left most pane. Clicking on any of the links, in the document pane, jumps the users directly to the report item.
It is similar to the table of contents.
Please note that clicking on the document map links, refreshes the report.
Lets look at an example for a document map.
Step 1: Create a blank report by connecting to Adventure works database.
I have used the following query to create my dataset:
SELECT Sales.SalesTerritory.Name as Region,
Sales.SalesTerritory.CountryRegionCode,
Sales.SalesTerritory.[Group] as Territory,
Year(Sales.SalesOrderHeader.DueDate) as Year,
Month(Sales.SalesOrderHeader.DueDate) as Month,
Sales.SalesOrderHeader.TotalDue
FROM Sales.SalesTerritory
INNER JOIN Sales.SalesOrderHeader
ON Sales.SalesTerritory.TerritoryID = Sales.SalesOrderHeader.TerritoryID
Order by Sales.SalesTerritory.CountryRegionCode
Your design view after creating the report should look something like this.
Please observe the Row groups.
Adding Territory as a group is necessary here, else SSRS will repeat the Territory values in the document map.
You can hide one of the territory column (the non-group one) in the report.
Next, goto the Territory column, and select the properties.
Go ahead and choose Territory in the DocumentMaps Property:
Now hit preview, and you should be ale to see the follow SSRS 2008 R2 report with a document map:
Select any one Territory in the document map, and the report will jump to the appropriate page.
This comment has been removed by the author.
ReplyDelete