Report Parts in SSRS helps you to reuse the reports, or Report Items in multiple reports. In this article we will show you, How to create, and Publish Report Parts in SSRS, How to reuse them, and How to update the existing report parts with example.
To demonstrate the steps involved in creating Report Parts in SSRS, We are going to use the previously generated report that we shown below. Please refer Formatting Date and Time article to understand the report data, and refer Add Rectangle article to understand the rectangle configuration.
TIP: If you find any difficulty in creating report in Report Builder. Please refer Create New Report in SSRS Report Builder article to understand the same.
Let me show you the report preview. As you can see, it is pretty ordinary Table Report with formatted date and time, and it has the Address (inside the rectangle) on top of the report
Publish Report Parts in SSRS
Is was very easy to publish report parts from Report builder. In order to do so, click on the Publish Report Parts option from the Menu.
Once you select the Publish Report Parts button, following pop up window will be opened. It is always advisable to select the second option because, it gives you more control of what you are doing.
After you select the second option, a new window called Publish Report Parts will be displayed. Here, it will show you the list of available report parts.
Let me expand each and every report part so that you can preview them
Next, add a valid description that describes the report part functionality.
Once you are done with your review, please check mark the required report parts and click the Publish button
Once you click the Publish button, a message will be displayed. It writes number of report parts that are successfully published, and failed.
Use Report Parts in SSRS Reports
In this example we will show you, How to use the report Parts in SSRS reports. To demonstrate the same, we need an empty or blank report. So Please open the Report Builder, and select the New Report tab, and then select the Blank Report option.
As we shown below we added a report title as SSRS Report Parts Example, and an Execution time in Page footer. Apart from that, we also formatted the text
In order to use the existing report parts, Please go to the Insert Tab, and click the Report Parts button as we shown below
Once you click the Report Parts tab, a new window called Report Part Gallery will be opened. You can use this window to search the report parts present in the Report manger.
Let me search for Employee table. Once you got the required report part, double-click on it will automatically add that report part into designer window.
Let me search for the Company
As you can see from the below screenshot, we just added all the existing report parts (table, rectangle, Image) to this new blank report.
let me show you the report preview
Let me show you, what will happen if I change the Address color. Remember, whatever changes you made in this report belongs to this report only. But, if you publish the report parts then main report part will be updated.
and the report preview is:
Now let me show you what will happen if I publish the report part from this report?
I think I forgot to mention the Report Parts folder. When you publish a Report Part for the first time then Report Manger will automatically add new folder called Report Parts. This folder will hold all the report parts that we publish in life time.
let me show you the report parts inside the Report Parts folder.
Let me add the address report part to check whether the report part is updated or not. As you can see from the below screenshot, it is displaying the updated address (text color is red).
Update Report Parts in SSRS
Let me open the original report. In this example we will make some changes to this report, and show you what will happen to the dependent report?
As you can see, we had deleted the Yearly Income Column. Next, we published the report parts
If you want that update to be reflected in the dependent report. Within the second report, please click on the Check For Updates option from main menu.
Once you click on the Check For Updates option, a new message will be displayed. If there are any report part updates then View Updates button will be displayed otherwise, it displays a message – 0 updates are available.
Once you click on the View Updates button, a new window called Update Report Parts will opened as we shown below. It will display the available report part updates. By check mark Notify me when this report part is updated on the server option, report Builder will automatically ask you for updates.
Please select the report Parts that you want to update. Here, we are selecting all the report parts.
As you can see from the below screenshot, Employee table is updated with the new report part ( No yearly Income Column)
Let me show you the report preview
Thank You for Visiting Our Blog