我有一個SSRS報告,其中兩個日期都有NULL
值,因此它返回錯誤。所有其他日期都返回正確的值。如何通過錯誤返回空白單元格?我究竟做錯了什麼?我想計算兩個日期之間的天數差異,不包括週末,在某些情況下兩個日期都爲NULL
代碼,我下面嘗試:
=IIF(IsNothing(Fields!BondRegCSTM_DateRegistered.Value) AND IsNothing(Fields!CommRecHistory_DateReceived.Value), Nothing,
(DateDiff("d", Fields!BondRegCSTM_DateRegistered.Value, Fields!CommRecHistory_DateReceived.Value))+1-
(DateDiff("ww", Fields!BondRegCSTM_DateRegistered.Value, Fields!CommRecHistory_DateReceived.Value)*2)-
(IIF(DatePart("w", Fields!CommRecHistory_DateReceived.Value) = 1, "1", "0"))-
(IIF(DatePart("w", Fields!BondRegCSTM_DateRegistered.Value) = 1, "1", "0")))
應該和和是或? – user1429080