Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/fsharp/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Reporting services SSRS-检查数据是否为空_Reporting Services_Reportingservices 2005 - Fatal编程技术网

Reporting services SSRS-检查数据是否为空

Reporting services SSRS-检查数据是否为空,reporting-services,reportingservices-2005,Reporting Services,Reportingservices 2005,在我的报告中我有以下的表达 =FormatNumber(MAX(Fields!Reading.Value, "CellReading_Reading"),3) 现在,当数据集为空“字段”时!Reading.Value'变为空,查找其最大值无效。如何检查整个列是否为空 我尝试了以下方法,但没有成功 =iif(IsNothing(Fields!.Reading.Value),"",FormatNumber(MAX(Fields!Reading.Value, "CellReading_Reading

在我的报告中我有以下的表达

=FormatNumber(MAX(Fields!Reading.Value, "CellReading_Reading"),3)
现在,当数据集为空“字段”时!Reading.Value'变为空,查找其最大值无效。如何检查整个列是否为空

我尝试了以下方法,但没有成功

=iif(IsNothing(Fields!.Reading.Value),"",FormatNumber(MAX(Fields!Reading.Value, "CellReading_Reading"),3))
但我还是在报告中发现了错误。我也退房了,没能从中得到线索。我想在报告级别处理它。

像这样尝试

= IIF( MAX( iif( IsNothing(Fields!.Reading.Value ), -1, Fields!.Reading.Value ) ) = -1, "",  FormatNumber(  MAX( iif( IsNothing(Fields!.Reading.Value ), -1, Fields!.Reading.Value ), "CellReading_Reading"),3)) )

或者在SQL查询中,使用IsNull或Coalesce(SQL Server)包装该字段

无论哪种方法都有效,我喜欢在查询中加入这种逻辑,这样报表就可以做得更少