1
votes

I have a multi valued parameter in my ssrs report. (Bus numbers) the question is how can I make the data set filter property optional? i've seen a blog that makes the filtering optional but my question is how can i do that if my parameter is multi valued?

http://www.andrewshough.com/development/sqlserver/ssrs/optional-filter-in-ssrs/

I tried adding a "No Filter" in my selection list but i cant seem to make it work.

=IIF(Parameters!BusNumber.Value = "No Filter", "",Fields!BusNumber.Value)
1

1 Answers

2
votes

Typically, if you have a multi-valued parameter, there's an implicit way to "not filter": select all options.

As a user, if I get to choose a "filter" parameter @OnlyTheseCategoryIds, and I check the Select all option, I'd expect my results to come through "unfiltered" (even though technically it is filtered, just every row passes that filter).

You've already mentioned one more explicit alternative ("No Filter" option), but "cant seem to make it work" is hardly enough info for us to be able to help you (other than completely spelling out how to do it).

Another alternative would be to create a cascading parameter before the filter-one, something like @FilterOnCategories (boolean). Only if "True" is selected will the second parameter be available.