Ok you have been playing around with SSRS 2008 R2 as did I and while I can’t wait to get my hands on CTP 2 of Denali here is some tips to get your reports a bit more standardized. The concept is called Report Parts. Report Parts are a SSRS 2008 R2 only feature. Basically it allows you to publish elements of a report as a separate objects to the report server. These elements can be any element of a report, as long as there is no custom code in them. So how do you make a report part? Well, that’s simple. Here is a basic description on how to create a report part.
Report Part Creation
Create a report and drag an element onto it and you have done the basics of creating a report part. The only thing you now need to do is to tag the element as a report part. In report builder go ‘start’ and click ‘Publish Report Parts’
You then will get a question if you want to ‘publish all report parts with default settings’ or you want to ‘review and modify report parts before publishing’. Choose the second option and you will see a window with elements of the report that can become report parts.
In the demo I created I only made a header, hence there is only 1 element in the list. So the header element is the object that I want to make a report part, so I have that element checked. So to complete the meta data of the report part for further use click on the arrow next to the soon to be published report part and enter a description of the report part.
When you are happy with design and working of the part(s) then press publish. By default the report part will be publish in the folder ‘Report Parts’ on your reporting server.
Report Part Usage
Ok now that we have created an published a report part, anybody that has rights to view the part is able to use the report part in the creation of a new report. In report builder, after creating a new report, go the ‘insert’ ribbon an d click the ‘report parts’ button.
A search task pane called ‘Report Part Gallery’ will appear and then press search. All available report parts will appear in the report part gallery
Drag the part you need into the report and your are done.
Maintaining and updating Report Parts
Is the report part read only? No, you can edit the part, but beware as the original author of the report part has made changes to the part and he has published them and you update your report parts, your modifications will be be lost. So how you check for updates? Go to the start button and click ‘Check for Updates’. If report parts have been updated, you will get a notification, and you will be able to accept the changes. Due to the fact that modifications to the report parts will be lost when they are updated, I strongly recommend that you keep your report parts as a standard as possible. Use well known expressions like the default field Report Name as the title of your report and the report description as your subtitle. In this way your header is flexible and custom modifications will be kept to a minimum. You off course can create several report headers, just to give the user / report creator a choice. But remember custom code is not allowed. Have fun coding.