I have a column of data brought in from SQL that is sometimes populated, other times null. In an SSRS report, I have two columns: one for the actual value, one for a calculation on that value.
The column for the value is blank when it is null, which is what I want. However, the calculation column returns "#Error" even when I try and catch this with an IfNothing() clause.
Below is the expression on the calculated column, with the "Ready to Discharge" field being the column of sql data that is intermittently populated.
In the picture below are the two columns. The second column finds the time difference between the "Ready Disch" time and another field "Signup Time", which is a timestamp.
=IIF(IsNothing(Fields!ReadyForDischarge.Value) = True, Nothing, (IIF(Fields!DoctorSignUp.Value > Fields!ReadyForDischarge.Value, "-"& Format(Dateadd("s", abs(datediff("s", Fields!DoctorSignUp.Value,Fields!ReadyForDischarge.Value)), "00:00"), "mm:ss"), Format(Dateadd("s", abs(datediff("s", Fields!DoctorSignUp.Value,Fields!ReadyForDischarge.Value)), "00:00"), "mm:ss"))))