Joining Parameters in SSRS

烂漫一生 提交于 2019-12-12 23:07:29

问题


What could be wrong with my expression below? I am trying to check that if the first value in my parameter list is checked or selected, ssrs should give me this otherwise give me the list of values selected. ="Value: " & IIF(Parameters!Code.Label = "Select All","All",Join(Parameters!Code.Label,","))


回答1:


When you choose "Select All" in a multi-value parameter, SSRS doesn't treat this as the actual parameter label, it will an array of labels from all the available values.

One way to get your requirement is to compare the number of selected parameters against the number of values in the parameter Dataset; if these match, all must have been selected:

="Value: "
  + IIf(CountRows("MyParameterDataset") = Parameters!Code.Count
    , "All"
    , Join(Parameters!Code.Label, ","))

If you are hard-coding the available values, i.e. not using a Dataset, you can hard code the count into the expression.



来源:https://stackoverflow.com/questions/23297297/joining-parameters-in-ssrs

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