Search code examples
ssrs-2008ssrs-expression

IIF IsNothing expression example


I'm using SSRS 2008 and am trying to create an expression where if date field A is greater than date field B or date field A is NULL then this filter will select this record. How do I do this?

I tried this expression to select NULL date fields, but it is not working. I set the datatype to "Text" for now--should I set this to boolean instead? If so, then how can I modify this expression?

=iif(isnothing(Fields!A_date.Value),"yes","no")

Solution

  • =IIF((CDATE(Fields!A_date.Value)>CDate(Fields!B_date.Value)) OR ISNothing(Fields!A_date.Value),"Yes","NO")
    

    Try this !!!