Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2012 Forums
 Analysis Server and Reporting Services (2012)
 SSRS Drillthrough with multi-value parameter

Author  Topic 

blodzoom
Starting Member

28 Posts

Posted - 2014-11-24 : 18:06:31
I just successfully created my first SSRS report with a drillthrough to a subreport via a 'Go To Report' action on a BusinessID field in a table.

My question is... Is there a way to set it up so that the user can select more than one BusinessID from the table (maybe checkboxes?) and pass the multi-value parameter to the query in the subreport using an IN rather than = ?

I've tried doing some research and I think that it's possible to use a dropdown to select multiple values, but I want them to be able to interact with the primary report to select the values for the subreport.

gbritton
Master Smack Fu Yak Hacker

2780 Posts

Posted - 2014-11-25 : 09:33:25
Short answer: yes, you can do that.

Longer answer. Ensure that your SQL queries always use IN rather than =, even for single-value parameters. So

WHERE ... IN (@parameter)

Which will work if you have just one or a list.
Go to Top of Page

blodzoom
Starting Member

28 Posts

Posted - 2014-11-25 : 14:19:48
That sounds great but when I click one textbox, it immediately loads the drillthrough. What is a good way to set it up so that I can select more than one?
Go to Top of Page

gbritton
Master Smack Fu Yak Hacker

2780 Posts

Posted - 2014-11-26 : 09:40:09
You need to use report parameters for that.
Go to Top of Page
   

- Advertisement -