1
默認情況下,SSRS中的SUM函數排除空值。我希望能夠檢查詳細信息組中的任何NULL值並在摘要組中引發錯誤。在詳細視圖中,我用它來檢查NULLS:如何在SSRS中使用SUM函數時檢查NULL值
=IIF(IsNothing(Fields!EquityPrice.Value)) ,"#Error", Fields!EquityPrice.Value*Fields!EquityShares.Value)
這可以根據需要工作。
當我在摘要部分使用它時,它會忽略NULLS並返回非空值的SUM。我想返回「#錯誤」,而不是:
=IIF(IsNothing(SUM(Fields!EquityPrice.Value))) ,"#Error", SUM(Fields!EquityPrice.Value*Fields!EquityShares.Value))
我試圖消除了「IsNothing」表達,但無濟於事總和。任何幫助,將不勝感激。提前致謝!
純邏輯。謝謝! – user1171915 2013-05-13 20:59:07