在 SSRS 中使用條件來提高可見性 (using conditionals in SSRS for visibility)


問題描述

在 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".

(by singledeeRoss Bush)

參考文件

  1. using conditionals in SSRS for visibility (CC BY‑SA 3.0/4.0)

#conditional-statements #ssrs-2008 #visibility






相關問題

在 SSRS 中使用條件來提高可見性 (using conditionals in SSRS for visibility)

Smarty - {IF} {/IF} 內的條件太多 (Smarty - Too many conditions inside {IF} {/IF})

awk 如果有多個條件拋出錯誤 (awk if with multiple condition throws error)

正則表達式錯誤,嵌套標籤 (Regex error, nested tags)

警告:分配條件 (Warning: Assignment in condition)

JavaScript 中的條件語句 (Conditional Statement in JavaScript)

與 linus 條件 '-z' '-n' 混淆 (Confuse with the linus conditions '-z' '-n')

如果條件為真,則將表達式添加到循環中 (if condition is true, add an expression to a loop)

為什麼用多態性替換條件有用? (Why is replacing conditionals with polymorphism useful?)

如何使用條件將一個數據框列的值與另一個數據框列的值匹配? (How do you match the value of one dataframe's column with another dataframe's column using conditionals?)

使用另一個數據框的條件創建一個新列 (Create a new column with a condition of another dataframe)

排除具有空值的 Python 列表 (Excluding Python Lists With Empty Values)







留言討論