SSRS Multi Value Parameter. Check whether “Select All” is selected

后端 未结 7 1703
失恋的感觉
失恋的感觉 2020-12-17 10:40

I have a multi value parameter in my SSRS Report. I want to find out whether (Select All) is checked in that parameter.

In other words, whether all the values in th

7条回答
  •  执笔经年
    2020-12-17 11:08

    For the specific use-case of showing the selected filter on your report in a textbox, here's the expression that will show "All" if "(Select All)" is selected, otherwise it will show all the selected values as a comma-separated list:

    =IIF(
         Parameters!YourMultivalueParam.Count = countrows("YourDataset"),
         "All",
         Join(Parameters!YourMultivalueParam.Label,", ")
     )
    

    (split onto multiple lines for readability)

    countrows reference: https://technet.microsoft.com/en-us/library/dd255215.aspx


    Credit to other answers, just want to extend them for this common scenario.

提交回复
热议问题