問題描述
在 SSRS 中使用條件來提高可見性 (using conditionals in SSRS for visibility)
In a SSRS (BIDS) 2008 report that I have created, I have a conditional statement I'm trying to use to determine the Visibility of items in a column.
An expression almost identical to this works on the General tab, but not on the Visibility tab. I get the following error when trying to preview the report
An error occurred during local report processing. The Hidden expression used in textbox 'Status' returned a data type that is not valid.
I have pasted the conditional below for your reference. Do the rules/formatting for Visibility expressions differ from those of the General tab? Thanks!
=IIf(Fields!tagname.Value="3981.CompA1.Bool.CompA1StatusOnline"
And Fields!Status.Value="0","True",
iif(Fields!tagname.Value="3981.CompA1.Bool.CompA1StatusFaulted"
And Fields!Status.Value="1","True",
iif(Fields!tagname.Value="3981.CompA1.Bool.CompA1StatusOffline"
And Fields!Status.Value="0","True","False")))
‑‑‑‑‑
參考解法
方法 1:
Try using true
instead of "true"
.