首页 > 解决方案 > 在 iif 语句中连接字符串和字段

问题描述

我有一个 SSRS 计算文件,我可以在其中连接一个字符串和一个字段。我该如何使用&。最好的方法是什么?

=iif(Fields!TYPE.Value= "A", "participated in" &Fields!NAME.Value& "'s game",
iif(Fields!TYPE.Value= "N", "did not participate in" & Fields!NAME.Value & "'s game",
"###ERROR###"
))

参加了帕特里克的比赛或没有参加帕特里克的比赛

标签: reporting-servicesssrs-2008

解决方案


试试下面

 =IIF(Fields!TYPE.Value= "A", "participated in" AND Fields!NAME.Value= "'s game",
    IIF(Fields!TYPE.Value= "N", "did not participate in" AND Fields!NAME.Value="'s game",
    "###ERROR###",nothing ),nothing)

推荐阅读