SQL Reporting Services Boolean Parameter (True/False/All(?))

老子叫甜甜 提交于 2020-02-05 08:13:46

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!