我是SSRS的新手这是我正在尝试的表达,但它正在显示“#Error”我尝试了各种各样的事情,但仍然没有任何进展,任何猜测为什么会发生这种情况。
=IIF(Fields!MailMeans.Value = "M","METER",
IIF(Fields!MailMeans.Value = "I","INDICIA",
IIF(Fields!MailMeans.Value = "S","STAMPS",
IIF(Fields!MailMeans.Value = "N","NO-MAIL","")
)
)
)
答案 0 :(得分:1)
尝试使用Switch
而不是嵌套的IIF
=Switch(Fields!MailMeans.Value = "M", "METER",
Fields!MailMeans.Value = "I", "INDICIA",
Fields!MailMeans.Value = "S", "STAMPS")
答案 1 :(得分:0)
这也应该有效:
=Switch(Fields!MailMeans.Value = "M", "METER",
Fields!MailMeans.Value = "I", "INDICIA",
Fields!MailMeans.Value = "S", "STAMPS",
Fields!MailMeans.Value = "N", "NO-MAIL",
Fields!MailMeans.Value <> "M" AND Fields!MailMeans.Value <> "I" AND
Fields!MailMeans.Value <> "S" AND Fields!MailMeans.Value <> "N", "")