Today I was working on a Reporting Services report that needed to have all the values checked for a multi-value parameter when the report opened up. It was a little tricky to figure out, but it turned out to be very simple in the end.
Multiple Value Parameters
I've got some multiple value parameters on a report. These are easy to create in SQL Server Reporting Services. Just check the box for your parameter and the user gets a check box drop down letting them pick more than one value from the drop down.
You can set the available values for the drop down to a dataset in your report or a shared dataset in the Reporting Services project. Next, pick the value and name fields (which can be the same column in the dataset if that's what works in your situation).
This is the part where we want to check each of those multiple values on report startup. The hard part is, I don't know the values at design time, so I can't hard code them. I want to simulate a "select all" of the check boxes. My mind started wandering to VBA code I could put in the report as a startup function.
But on a whim, I tried selecting all the values from the same query, and I was pleased to see it work!
And I get the results I want on the report when it opens:
About Volare Systems
We build high quality web and mobile web apps that run fast and look great on every device . We are based in Denver, Colorado . Let us know if we can help your company with custom software development or web application development.
We hope this blog post was helpful . If so, please share it using the social toolbar on this page so others can find it. Thank you .