问题
I have a SSRS report that works with boolean parameter. I would like to add a third option to show all the records on the report. Both true and false. The concept is that the dropdown will include three options (All,True,False).
Is there a way to acheive that?
Thanks,
-Y
回答1:
Set the dataset filter to something like this:
I have 3 available values for @parmTRUEFALSE
False = False
True = True
All Records = (Null)
=IIF(IsNothing(Parameters!parmTRUEFALSE.Value), ObjectFieldName.Value, Parameters!parmTRUEFALSE.Value)
If the user selects All Records... the filter uses ObjectFieldName.Value
and returns all records because @parmTRUEFALSE = (Null) / IsNothing
回答2:
Select Allow multiple values:
Then add the desired values:
Then add a new filter and convert the field value to String:
Then select the IN operator:
来源:https://stackoverflow.com/questions/5621111/sql-reporting-services-boolean-parameter-true-false-all