Here is a new blog entry about a feature that comes available thanks to the RDLC we can use in NAV 2009. Called "Document map". A document map is a navigation feature that you know form PDF. In some PDF's you can browse to the chapters in the document. Something like this:
In Microsoft Word 2010, if you use the Header-formats, you get this out-of-the-box:
You can use this in your RDLC-layout as well. It works with groupings. A group-title (if I may call it like that) is some kind of "title" of a certain group of data. You can compare it with a title of a paragraph in a word or pdf document. Let us work this out with an example (a complete useless idiotic example, as always ... you know ... I've got the creativity of a canary (and nothing more)): we'll create a report on Item Ledger Entry, grouped by Location code and Entry Type. I know, it doesn't make sense, but it gave me enough data to show you the concept.
Let's do the report:
I created the dataset with the report-wizard ... A list-style document with these columns:
Furthermore, no groupings (we'll do that in Visual Studio when defining the layout) and finished! If you would run this report, it would give you this result:
That's it, we've got the dataset. Now, let's define the RDLC
layout. I'm lazy, so I don't want to start from scratch .. therefore, let's click "Tools"/"Create Layout Suggestion". You'll open a Visual Studio (or another RDLC editor)(if you want to know what you need for this, please read my blog entry about it) and the layout will be there.
You see, just a default layout like we had in the NAV Report Designer. We'll change this, because we want to have a document map example ... .
I want to group on "Location code" and "Entry Type", so first I sort on the key (I would recommend to add a key for this, and use this in your dataset - but it seems it's not necessary (my report worked fine without the key)):
For a better look, I'll move those two columns to the front (you can do this my cut/past). The, I'll add the grouping:
Do the same for the "Entry Type" field.
Now, we've got two groups .. to make this a little bit clearer, just move the expression of the location code to its grouping level, and the same for the Entry type. You'll get something like this:
If you run the report by now, you would get something like this.
Now, this is not new. Just a grouping, nothing more, nothing less.
But how do I add that bloody Document Map?
Well, just go back to your RDLC-layout design in Visual Studio, and go to the properties of the table, and to the Groups-tab:
Edit a group. There you'll find the "Document Map Label"-property. Here, you have to fill in the expression of what your label should be in the document map. I want it to be exactly the same as my Location Code, or Entry Type, so I use that value. Just copy the expression into the Document map:
Do this for both Location Code and Entry Type.
When finished, save the layout, and run your report again:
On the left you'll see a treeview, which is your document map. Just click on the value's and it will navigate you through the resulting report.
How cool is that? :-)
If you would think it would stop here ... you're wrong. Just export your report to Excel or PDF. You'll find your document map again. Here is a screenshot of Excel, where it creates a separate sheet "Document Map" with hyperlinks to the resulting report:
While in PDF it creates bookmarks to the position in the document:
Only issue here is that you don't see the indentation anymore ... but I can live with that :-).
Ps, you can download my report here. Nothing fancy, just to show you the basics of the Document Map possibilities.
To get indentation in a PDF just add an empty string to the "Document Map Label" field for the grouping only i.e.
= " " + Fields!<FieldName>.Value
and add a normal document label to a textbox/label just above the grouping