Building Reports in SQL Server 2005—Document Mapping
Microsoft .NET Framework, ASP.NET, Visual C# (CSharp, C Sharp, C-Sharp) Developer Training, Visual Studio
| CSharp-Online.NET:Articles |
| Database Articles |
| © 2006 R. Landrum, W. J. Voytek |
Document Mapping
Creating a document map in an SSRS report will present users with an integrated navigation pane when the report is rendered. The user can select an item in the navigation pane, which will cause the report to jump to the position where that item is located. In the example report, for instance, a user might be interested in viewing information about Alzheimer’s patients. You can create a document map for the Diagnosis group in the report so that when the user selects Alzheimer’s from the navigation pane, the report will automatically skip to that section; in other words, the user will not have to manually search through the report to find the desired information. You can also add document maps at multiple levels, creating a hierarchical selection in the navigation pane. Keeping with the example, you can add a document map to the Service_Type group in addition to the Diagnosis group; the user can then expand Alzheimer’s in the navigation pane to see all the types of services—home health aide, for example—that have been performed for each diagnosis.
You create document maps by adding an expression to the Document Map Label property
available for individual report items or for groups. By following these steps, you will add a document
map label to the Service_Type and Diagnosis groups:
1. On the Layout tab, right-click the entire row for the second-level grouping, which is the Service_Type group, and select Edit Group.
2. On the General tab of the Grouping and Sorting properties dialog box,
select =Fields!Service_Type.Valuein the Document Map Label drop-down list and click OK.3. Complete steps 1 and 2 for the Diagnosis group, which is the first-level grouping above Service_Type.
Select =Fields!Diagnosis.Valuefor the Document Map Label option.
Now when you preview the report, the navigation pane will automatically be displayed on the left side of the report. The preview, which is in HTML by default, displays in one of the rendering formats that supports document mapping, such as PDF (see Figure 4-7).
![]()
Figure 4-7. Report with navigation pane from document map
The EmployeeServiceCost_DocumentMap.rdl report in the Pro_SSRS project includes
a document map.
■Note Adobe Acrobat views document mapping as bookmarks when the report is rendered in PDF. Bookmarks in SSRS perform a different function altogether. They are embedded within the report, and report items are assigned bookmark links.
|

