show/hide columns in SSRS report 2012 based on Multiselect parameter

随声附和 提交于 2019-12-25 09:43:04

问题


i have been trying to hide/show columns within my tablix based on multi value parameter , but whenever i am plugging in the expression in the column visibility properties it is not showing what i select from the parameter and hide what is not select. Here is the expression: =IIF(InStr(JOIN(Parameters!parameter.Value,", "),"value"),false,true)

any help???


回答1:


If I understand correctly, you want to show the column if you select a value which contains "value". Right?

So the expression should be like below:

=IIF(InStr(JOIN(Parameters!parameter.Value,","),"value")>0,false,true)




回答2:


I always get this wrong too. I think backwards. It is actually asking for the expression that will hide the column. SO Black_T is correct with his answer.

=IIF(InStr(JOIN(Parameters!Parameter.Value,","),"value")>0,false, true)

so whenever the expression picks up that value in the statement, it will return false, meaning that it should not hide it, and whenever it doesn't find it, well the returned product will also hide it! pretty ingenious!

Thanks and enjoy!




回答3:


=IIF(InStr(JOIN(Parameters!parameter.Value,","),"value")>0,true,false)


来源:https://stackoverflow.com/questions/28244115/show-hide-columns-in-ssrs-report-2012-based-on-multiselect-parameter

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