Problem
Reports outputs that differ on parameter values are a very common report design scenario. A common business scenario is where each report output needs a different caching / security / storage configuration. In the absence of any mechanism to deal with this requirement, a workaround would be to create multiple reports and configure them individually. This would lead to duplication of the same report in multiple places and maintainability would become a big challenge. In SSRS, there is a smart way to deal with this issue and in this tip we will show you how.
Solution
Using Linked Reports is the solution to this problem. Linked reports can be seen as a shortcut to the original report. The layout and the data source of the report cannot be changed. The remainder of the report level settings can be individually configured on each report.
Please keep in mind that this tip expects a working level of knowledge on SSRS from the reader. If you are new to SSRS, check out this tutorial or these tips to start to get up to speed. To simulate the problem in question, I have created a report from the Contact table of the AdventureWorks database. I have added a report parameter to the report and deployed it to the report manager. On executing the report, it looks like the below screenshot.
To show the value of the Linked Reports, we would create two reports, where we would set the parameter value as “Mr.” for one report and “Mrs.” for a second report. To address these items, click on the side of the report and select “Create Linked Report” from the context-specific menu of the report. Go the individual report, select “Manage” from the context-specific menu, and configure the parameters tab with respective values as shown in the below screenshot.
Execute each report and they should function as configured, with the default parameter values.
Now make a change to the original report. For example change the background color of the table and deploy the report. Execute the Linked Report to see if the change is reflected. You would find the results as shown in the below screenshot.
Meeting the requirement of creating context-specific reports with the flexibility to configure each report individually, can be accomplished by creating a Linked Report using a single parameterized report as the master report.
Next Steps
- For the purpose of this demonstration, we have configured just the parameters. Check out what other settings can be configured on a linked report.
- Check out whether you can create a linked report out of a linked report.
- If you are new to SSRS check out this tutorial or these tips to start to get up to speed.
Siddharth has more than 14 years of experience in the IT Industry, with more than a decade of experience in Business Intelligence and Analytics, for clients banking, logistics, government, Media Entertainment, products, life sciences and other domains. He has been a lead architect for a portfolio of 40+ apps, containing apps in web, mobile, BI, Analytics, data warehousing, reporting, collaboration, CMS, NoSQL and other technologies. He has several certifications and is a published author for online and print-media publications, as well as the MSDN Library.
In his present role, he remains responsible for architecture design, technology stack selection, infrastructure design, 3rd party products evaluation and procurement, and performance engineering. These applications use technologies like Elasticsearch / Lucene, MongoDB, SharePoint 2013 and 2010, jQuery-based framework like Highcharts and GoJS, SQL Server and the Microsoft Business Intelligence stack (SSIS, SSAS, SSRS, MDX, PowerPivot, PowerView), jQueryMobile, Bootstrap, iOS xCode framework, and many others.
- MSSQLTips Awards: Champion (100+ tips) – 2018 | Author of the Year – 2017 | Author Contender – 2016, 2018-2019


