Using a parameter across multiple reports
How can we go about using a single parameter across multiple reports? In example, a lot of our reports require the user to select a specific doctor as a parameter. We don't want to have to write the query to "SELECT Dr_Name from Doctor_Table" in every report,
we would like to use the Doctor Parameter in a lot of reports. Any suggestions?
We are using SSRS 2008 R2.
May 2nd, 2011 2:06pm
This depends how people navigate between reports. If the user clicks on something in one report to go to another then you can include the @Doctor parameter in the new report: Go to the properties of the item with the link and selct the
Action property, here you can Add the parameters to run the second report with (these will be used in place of any default values). If people navigate by clicking URLs in the report, then you'll need to pass the parameter via
the URL. To do this you'll have to create an expression that generates the corect URL.
If navigation is done in some other way, there may be other solutions. If the above doesn't help, can you give some more details on how the reports work together?
RayIf this post, or another, answers your question, please click the 'Mark as answer' button so others with the same problem can find a solution more easily.
Free Windows Admin Tool Kit Click here and download it now
May 3rd, 2011 8:16am
Hi algunderson,
In Reporting Services, if we have a parameter for a lot of reports, we have to add this parameter for each report, as there is no build-in feature to create a global parameter.
From your description, if the parameter get values from a query and you don’t want to write the query(SELECT Dr_Name from Doctor_Table) in every report, one possibility suggestion is that you can create a shared dataset using the query. When you create
other report and add a parameter for the report, you can use the created shared dataset for parameter’s default value or available value without writing the same query. Please notice you still need to create the parameter for every report.
For more information about Create a Shared dataset, please see:
http://msdn.microsoft.com/en-us/library/ms160345.aspx
If you have any questions, please feel free to ask.
Thanks,
Bin Long
May 4th, 2011 3:39am
This sounds like it's exactly what I want. Thank you for your time.
Free Windows Admin Tool Kit Click here and download it now
May 4th, 2011 8:13am