在报告中显示参数(多值)

时间:2021-08-11 08:01:06

Can anyone tell me how to display all the selected value of my multi value parameter in SSRS report. When giving parameter.value option it gives error.

谁能告诉我如何在SSRS报告中显示我的多值参数的所有选定值。给出parameter.value选项时会出错。

3 个解决方案

#1


146  

You can use the "Join" function to create a single string out of the array of labels, like this:

您可以使用“Join”函数从标签数组中创建单个字符串,如下所示:

=Join(Parameters!Product.Label, ",")

#2


11  

=Join(Parameters!Product.Label, vbcrfl) for new line

=加入(参数!Product.Label,vbcrfl)换行

#3


6  

I didn't know about the join function - Nice! I had written a function that I placed in the code section (report properties->code tab:

我不知道连接功能 - 很好!我编写了一个函数,放在代码部分(报告属性 - >代码选项卡:

Public Function ShowParmValues(ByVal parm as Parameter) as string
   Dim s as String 

      For i as integer = 0 to parm.Count-1
         s &= CStr(parm.value(i)) & IIF( i < parm.Count-1, ", ","")
      Next
  Return s
End Function  

#1


146  

You can use the "Join" function to create a single string out of the array of labels, like this:

您可以使用“Join”函数从标签数组中创建单个字符串,如下所示:

=Join(Parameters!Product.Label, ",")

#2


11  

=Join(Parameters!Product.Label, vbcrfl) for new line

=加入(参数!Product.Label,vbcrfl)换行

#3


6  

I didn't know about the join function - Nice! I had written a function that I placed in the code section (report properties->code tab:

我不知道连接功能 - 很好!我编写了一个函数,放在代码部分(报告属性 - >代码选项卡:

Public Function ShowParmValues(ByVal parm as Parameter) as string
   Dim s as String 

      For i as integer = 0 to parm.Count-1
         s &= CStr(parm.value(i)) & IIF( i < parm.Count-1, ", ","")
      Next
  Return s
End Function