=IIF(Fields!Date.Value = "", "Some Text", Fields!Date.Value)
我在报告中有上述声明,如果date value is NULL
,那么这将返回“Some Text”,但是当date
我得到date field has a value
而不是返回#error
我对表达式的理解是,如果满足条件,则返回“Some Text”否则返回Fields!Date.Value
为什么我会收到错误?
这样做
=IIF(Fields!Date.Value Is Nothing, "No Value", Fields!Date.Value)
IIF()
声明有以下format
:
=IIF( Expression to evaluate,
what-to-do when the expression is true,
what-to-do when the expression is false )
Parameter1
:它应该是一个Boolean
Expression
。Paremeter2
:当Expression
为true
时,此值将返回。Paremeter3
:当Expression
为false
时,此值将返回。