Showing results for 
Search instead for 
Did you mean: 

Crystal - ask for a date field that's within certain time or blank

0 Kudos


I'm fairly new to Crystal. I have a report built that looks at all absences in the last 7 days however I now need this to pick up any ongoing absences also. When I try and add the IsNull formula in, it seems to disregard the other parameters of the formula. I've tried a few ways and not getting it to where I need. Would very much appreciate if someone can assist.

My current formula is

{History.Absence End Date} in Last7Days and
{Snapshot.Key Unit Name 2} = "Business" and
{History.Absence Type} <> "Holiday"

The Absence End Date - I want it to show the record if this is in the last 7 days or is blank.

Thanks in advance!

Accepted Solutions (0)

Answers (1)

Answers (1)

Active Contributor
0 Kudos

Try using this as your selection formula:

  IsNull({History.Absence End Date} or
  {History.Absence End Date} in Last7Days
) and
{Snapshot.Key Unit Name 2} = "Business" and
{History.Absence Type} <> "Holiday"

Please note how I ordered the conditions and used parentheses. Because of the nature of null, checking for it should always come before any other conditions. And you need the parentheses because of the "or" - it won't work correctly without them. Also, make sure that you have Null handling set to "Exceptions for Nulls" in the menu bar of the formula editor - this won't work with it set to "Default values for Nulls."