SSRS = Dropdown to Stored proc

I have a bunch of dropdowns on an SSRS report.

Each drop down is basically a distinct list of values.

Each drop down is a multi select drop down.

Here is the issue:

If a null or blank value is in the recordset...or the distinct list pulls nothing back in the dropdown...

I need the parameter passed to allow all rows to be sent....or perhaps I need an option to allow in the multiselect for the user to pick a blank or null value.

This way when the user selects the next set of dropdowns a value will be returned.

I dont have a way that I can athink of to make each dropdown based on the other.
LVL 11
Robb HillSenior .Net DeveloperAsked:
Who is Participating?
nishant joshiTechnology Development ConsultantCommented:
Hi Hill,

You have to modify your SQL script from where you are pulling blank or null value.

Add UNION ALL SELECT NULL to your record so It will definitely return the null value. Regardless of value is existing or not.
Robb HillSenior .Net DeveloperAuthor Commented:
Will this basically allow it to make the dropdowns in the ssrs side  of things act as if they are optional...
ValentinoVBI ConsultantCommented:
Hi, I wrote an article on how to achieve that a while ago, enjoy the read: The "Select ALL" parameter option
Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

Robb HillSenior .Net DeveloperAuthor Commented:

Thats a nice implementation but I do not see how that makes it optional.

If I have 13 filters like this on a report....

How to I prevent one from messing up another filter.

I either need some dependency betweeen filters

Or way to let the user chose if they want to use the filter.

Or if there is a smarter way I am all ears and eyes:)
Robb HillSenior .Net DeveloperAuthor Commented:
so on top of what  ValentinoV said ..I need  this to also include  when a user selects all ....any values not in the select null or blank
ValentinoVBI ConsultantCommented:
Hi Robb,

How to I prevent one from messing up another filter.

It's all in the WHERE clause as far as I can tell, because of the inclusion of the "-1" parameters shouldn't influence each other. Of course, make sure to put the round brackets around the parts that belong together as in:

WHERE ( field1 in (@filter1) or -1 in (@filter1) )
  OR ( field2 in (@filter2) or -1 in (@filter2) )

All the best,
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.