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 to create linked reports in SSRS, Let me open my Report Manager to show the existing Data Sources, Datasets, and reports in our server.
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, the 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 fulfill the requirements.
Create Linked Reports in SSRS Example
Before we start to create a 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.
In SSRS 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, SSRS Report Builder will open.
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 to Report Parameters to understand each 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 hardcoded value with the parameter value. For this, please navigate to the Filters tab and click the Expression button.
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, the 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 description that describes the reporting functionality.
- Location: Use this button to change the report location. Once you click this button, it will display the list of folders available in the 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 the OK button, the report manager navigates to the newly created SSRS linked report preview.
We had successfully created a Linked report in SSRS, but we want the sales for the Clothing department. For this, we have to change the parameter value from Bikes to Clothing.
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, the Report manager will navigate you to a new page with the 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 SSRS linked report, and select the Edit in Report Builder option from the menu items.
From the below screenshot, you can see 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 reflect in the Linked report in SSRS.