SSRS IF语句语法不正确

时间:2018-11-08 11:12:10

标签: if-statement reporting-services syntax expression

我是SSRS的新手,发现语法非常困难,而且表达式文本框很糟糕,很难看到我在哪里犯了错误。

我想做IFF(First(Fields!TaxNumber.Value,“ InvoiceHeader”)= null,然后仅打印IS02Chars.value,否则同时打印IS02Chars和TaxNumber.Value。

  =IFF (First(Fields!TaxNumber.Value, "InvoiceHeader") = null ,
  ": " & First(Fields!ISO2Chars.Value, "InvoiceHeader"), 
  ": " & First(Fields!ISO2Chars.Value, "InvoiceHeader") & First(Fields!TaxNumber.Value, "InvoiceHeader"))

我看不出我的语法与IIF(Fields!ExitReason.Value = 7, 1, 0)

有何不同

1 个答案:

答案 0 :(得分:0)

  =IIF(IsNothing(First(Fields!TaxNumber.Value, "InvoiceHeader")), ": "
 & First(Fields!ISO2Chars.Value, "InvoiceHeader") , ": " &
 First(Fields!ISO2Chars.Value, "InvoiceHeader") &
 First(Fields!TaxNumber.Value, "InvoiceHeader" ) )