Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/reporting-services/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Reporting services 文本框中用逗号分隔的SSRS值?_Reporting Services_Sql Server 2008 R2_Ssrs 2008 - Fatal编程技术网

Reporting services 文本框中用逗号分隔的SSRS值?

Reporting services 文本框中用逗号分隔的SSRS值?,reporting-services,sql-server-2008-r2,ssrs-2008,Reporting Services,Sql Server 2008 R2,Ssrs 2008,我有一个数据集(存储过程),它返回以下数据 Location Type A None B None C Three D Two E None F Seventeen G None 我需要做的是在一个文本框中显示上面数据中的以下内容 c3,d2,f17 所以基本上我想显示所有非“无”类型 是否可以在SSRS中执行此操作?

我有一个数据集(存储过程),它返回以下数据

Location      Type
A             None
B             None
C             Three
D             Two
E             None
F             Seventeen
G             None
我需要做的是在一个文本框中显示上面数据中的以下内容
c3,d2,f17

所以基本上我想显示所有非“无”类型


是否可以在SSRS中执行此操作?

似乎您的环境是2008R2,您可以使用此功能来实现这一点:

=Join(LookupSet(
        True
        , IIf(Fields!Type.Value <> "None", True, False)
        , Fields!Location.Value & " " & Fields!Type.Value
        , "Locations"
    ), ", ")
=加入(LookupSet)(
真的
,IIf(字段!Type.Value“None”,True,False)
,Fields!Location.Value&&Fields!Type.Value
,“地点”
), ", ")
这使用
LookupSet
获取数据集中非None行的数组(在我的示例中称为
Locations
),每行构造所需的
Location
+
类型
字符串,然后使用
Join
获取数组并使用指定的分隔符将其连接到单个字符串中