One of the most common things I do during taking interviews is to give real life scenarios and assess the person on how he tackles the situation. Most of the times, what I really look for is how he goes forward in solving the problem – the approach and the way of thinking rather than the answer itself. Another thing that I look for is whether he tries to put some extra effort to implement the solution (especially the reporting part) in an aesthetic and user-friendly way. Most of the candidates would know the answer to some simple question like how to add data labels to their charts but they stutter when I ask what are smart labels or how can we prevent the cluttering of data labels. I would easily give brownie points to someone who details his solution with some extra attention to details. It must be my frequent rendezvous with creating big reports that make me extra fond of document maps in SSRS and an essential part of my SSRS interview questions. It is hard to imagine going through a big book that has no table of contents. But many users and developers have no problem at all in designing big reports without any navigational aid (although at some point of their wretched life, the users are going to curse the person who developed those reports), even though Microsoft has provided this feature. Document Map is a navigational feature in SSRS that, when implemented, allows the user to navigate through the document and its hierarchies. With this feature, you can add a panel to the left of the reports where you can have the list of “contents” of the report. What makes it more special is that on clicking the “content” in the list, you will be directly taken to the page where the content is present. Cool feature, huh? Requirement Suppose you already have a matrix or a table with some groupings as shown below Suppose the number of subcategories are very large and spans into multiple pages and the requirement is such that each user has to specifically search for a set of subcategories at a particular time of the day. It would make his life a lot easier if there was a document map listing the subcategories on clicking which he would be directly taken to the clicked subcategory Solution 1) Go to the design mode of the report and click on the group properties of subcategory.
2) Go to the advanced tab of the properties and set the Document map as the field Subcategory (you can select the appropriate field name from the drop-down).
3) Save the report, deploy it and then preview it .
Already you can see the panel at the left hand side which contains the list of subcategories. To hide/unhide this panel, you can click on the icon that has been highlighted in red in the above image. Notice that the “Document Map” text highlighted in blue is the report name. 4) Now you can click on any of the subcategories, say Handlebars and you would be taken to the page where the clicked subcategory is.
5) (a) You can also make document map labels for each of your report item. For eg, if you have 2 tables, you can click on the table and press F4 to see the properties.
5) (b) You can give the required name in the DocumentMapLabel property as shown above and then see the required result when you preview the report.
6) Now that you have seen the toggle symbol, you would have already guessed that it is possible to create hierarchies also in the document map label, for e.g., Subcategory—>Product. For that, all you need to do is to enable Document Map property for the Product group also.
Note Quoting a section from Packtub Learning SQL Server 2008 Reporting Services – “ Document Map is mostly for HTML rendering. Other renderers render differently.
-
PDF: Uses Bookmarks.
-
Excel: Uses named worksheet with hierarchical links. Report sections appear in other sheets.
-
Word document also has a document map like the table of contents.
-
Tiff, CSV, and XML ignore this setting.
-
Recursive data is related to the idea of self joins where the relationship between parent and child is represented by fields in the dataset. “
So there ends the part 3 of my interview series. In my next blog, I would be taking a momentary break from my interview question series and presenting a very interesting application of Document Maps, wait for it 🙂
Nice post. Is there a way to highlight the row when selected?
Thanks!
It is not supported out of the box, as far as I know. The issue is that SSRS doesn't recognize events (which is what happens here – jump to the row when clicked on the Document Map). This is unlike the normal drill down report, where the entire report is refreshed.
Ok. thanks for the reply
[…] came to my mind was document maps (yes, this is the post that I said I would come up with in my previous post). But then the conservative within me was trying to stifle out this idea saying that it can […]
This is very helpful! Is there a way to rename the document maps tree header ? By default it is the report name.
Thanks,
Bhuvana
This is great information, thank you! Can you sort the document map? Say I have a list of hundreds of part numbers and a count for each. I have the bookmarks set for each part number, and they display in the bookmarks section of my PDF. However the part numbers appear in the same order as they do on my report. I would like to sort the part numbers in the document map by part number, and leave the sort on the report the way it is.