从Visual Basic语法转换的SSRS语法

时间:2013-12-30 18:01:51

标签: reporting-services ssrs-2008 ssrs-tablix

如何在SSRS语法中写入以下内容?

If (( Fields!Name.Value = "Completed") or ( Fields!Name.Value = "Approved") or ( Fields!Name.Value = "Denied") or ( Fields!Name.Value = "Cancelled")) Then
     Fields!Name.Value =  Fields!Name.Value
ELSE
     Fields!Name.Value = "Other"
END IF

1 个答案:

答案 0 :(得分:1)

假设您要使用指定的值填充Tablix单元格,这是您的数据集:

Dataset

表达式:

=IIF((Fields!Name.Value = "Completed") OR (Fields!Name.Value = "Approved") OR    
     (Fields!Name.Value = "Denied") OR (Fields!Name.Value = "Cancelled"),
     Fields!Name.Value, "Other")

产生这个结果:

Result