IsNothing 不适用于报告生成器中的空值

use*_*981 5 report reporting-services ssrs-2008 reportbuilder3.0

我在表中有一个表达式来检查是否有返回值。

如果查询返回空或者null我想将值设置为0。

=IIF(IsNothing(Fields!DndCount.Value),0,Fields!DndCount.Value)
Run Code Online (Sandbox Code Playgroud)

但如果查询返回空则IsNothing()不起作用。

Poo*_*ook 1

尝试这个:

=IIF(Fields!DndCount.Value=0 OR 
IsNothing(Fields!DndCount.Value)=0 OR
Fields!DndCount.Value="null",0,Fields!DndCount.Value)
Run Code Online (Sandbox Code Playgroud)