IIF声明的行为不符合预期

R_Avery_17

=IIF(Fields!Date.Value = "", "Some Text", Fields!Date.Value)

我在报告中有上述声明,如果为date value is NULL,则它将返回“某些文本”,但是datedate field has a value我得到#error

我对表达式的理解是,如果满足条件,则返回“某些文本”,否则返回 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:当该值将返回Expressiontrue
  • Paremeter3:当该值将返回Expressionfalse

本文收集自互联网,转载请注明来源。

如有侵权,请联系 [email protected] 删除。

编辑于
0

我来说两句

0 条评论
登录 后参与评论

相关文章