A Linked Report in SSRS is similar to a Program shortcut. And it is derived from an existing report in the report manager, and also retains the report definition. In this article, we will show you the step by step approach to create Linked Reports in SSRS with example.
Before we start create linked reports in SSRS, Let me open my Report Manager to show the existing Data Sources, Datasets, and reports in our server.
For this demonstration we are going to use the previously created report called SSRS Dashboard so please refer the same to understand the Report data.
Let me show you the Report Preview.
For example, the Sales Manager of the Bikes category had asked us to develop the above-shown report. After seeing the report, Sales Manager of the Clothing department asked us to develop the same report for Clothing. In this situation, you don’t have to create a new report from scratch.
SQL Reporting services provide a concept called linked reports, and you can use the same concept to fulfil the requirements.
Create Linked Reports in SSRS
Before we start create linked report in SSRS, we have to change the filter settings. Because we are using the hard-coded value (Bikes) as the Dataset filter in the above-specified report. And in linked reports we can’t change anything apart from the parameter values. So, let me convert the hard-coded value to a parameter. If you are already using the Parameter report then start reading from Step 2
STEP 1: Click the down arrow beside the SSRS Dashboard report to open the menu items. Please select the Edit in Report Builder option from the menu items.
Once you select the Edit in Report Builder option, Report Builder will be opened as we shown below.
First, let me create a Parameter that will hold the string Data. From the below screenshot you can see that, we are creating a parameter called Country, and its visibility is Hidden.
I suggest you to refer Report Parameters article to understand each and every property present in the following window.
Next, let me add the default parameter value as the Bikes.
Lastly, please replace the Dataset Filter from the hard coded value with the parameter value. For this, please navigate to Filters tab, and click the Expression button as we shown below.
After you click the Expression button, a new window will be opened to write an expression. Here, please select the parameter value as the value.
STEP 2: Click the down arrow beside the SSRS Dashboard report, and select the Create Linked Report… option from the menu items.
Once you select the Create Linked Report… option, report manager will navigate you to the following window. Within the Properties tab we had:
- Name: You can your own name as per your requirements.
- Description: Please provide a valid description that describes the report functionality.
- Location: Use this button to change the report location. Once you click this button, it will display the list of folders available in report manager.
For now, we are saving the report in Home page, and its name as SSRS Linked Report, and Description as Dashboard For Clothing
Once you click OK button, report manager will navigate to newly created linked report preview.
We had successfully create a Linked report in SSRS, but we want the sales for Clothing department. For this, we have to change the parameter value from Bikes to Clothing.
In order to change the parameter value, Click the down arrow beside the linked report to open the menu items. Please select the Manage option from the menu items.
Once you select the Manage option, Report manager will navigate you to a new page with following tabs.
Let me go to the parameters tab, and as you can see that, the report parameter default value is Bikes. Here, we have to change the default parameter value.
Let me change the value from Bikes to Clothing
Now, let me show you the report preview.
Above report is a Linked report of SSRS Dashboard report, and the filter value is Clothing (Not Bikes)
Edit Linked Reports in SSRS
After creating a linked report in SSRS, You might be tempted to edit the linked reports in report builder. Let me show you, what will happen if I Edit the newly created linked report?.
To do this, Click the down arrow beside the linked report, and select the Edit in Report Builder option from the menu items.
From the below screenshot you can see that, it is throwing an error because we can’t edit the linked reports.
NOTE: Whatever changes you made in the Original report (i.e., SSRS Dashboard in this case) will automatically reflected in the Linked report in SSRS.
Thank You for Visiting Our Blog