filternullbirt

Birt report - Return requested data and nulls


I am currently building a report with some params one of which im having issues with.

CAST(c.scheduledvisitdatetime AS DATE) >= (ISNULL(?, CAST('1900-01-01' AS DATE)) OR c.scheduledvisitdatetime IS NULL)

I know the line of code above is incorrect but it is just where I currently stand after trying many approaches.

Basically, If a date range is entered then it returns all results within that date range, if the fields are left blank then it should return everything including nulls... what am I missing?


Solution

  • Thank you MRo for responding. I actually figured out the answer yesterday, code below for anyone else who may come up against this in Birt Reporting.

    ISNULL(CAST(c.scheduledvisitdatetime AS DATE), CAST('1900-01-01' AS DATE)) >= ISNULL(?, CAST('1900-01-01' AS DATE))
    

    This will bring back anything that is null and with a date when you leave your param filter blank.