我正在创建一个表达式,将多个字段组合到 SSRS 中的单个字段中。但是,当我导出到 CSV 时,一些记录会附加额外的双引号。我该如何解决?
原始数据:
SCode|BuildingNumber|StreetName|City|State|
---------------------------------------------
ABC| |123 Street|New York |NY|
DEF| |456 Street|Los Angeles|CA|
IJK|123|7th Ave |Chicago |IL|
XYZ| |789 Cir |Atlanta |GA|
我正在使用的表达式:
=Fields!SCode.Value & "#" & IIF(IsNothing(Fields!BuildingNumber.Value), Fields!StreetName.Value, Fields!BuildingNumber.Value & "\," & Fields!StreetName.Value) & "#" & Fields!City.Value & "#" & Fields!State.Value"
导出为 CSV 后的数据:
ABC#123 Street#New York#NY
DEF#456 Street#Los Angeles#CA
"IJK#123, 7th Ave#Chicago#IL"
XYZ#789 Cir#Atlanta#GA
谢谢!