This formula worked correctly in Crystal 6.5 but returns an error in Crystal 8.5 I can't figure it out.
If Month(CurrentDate) < 7 then
{DateCreated} >= Date(Year(CurrentDate)-1, Month(CurrentDate)+6, 01)
Else
{DateCreated} >= Date(Year(CurrentDate), Month(CurrentDate)-6, 01)
Basically, depending on the current date, the report selects all cases in the past 6 months. The error says that the month value must be in the range 1 to 12. 6 should only be added to the current date if the current date is less than 7. It doesn't seem to be evaluating the if statement.
Please advise!!
If Month(CurrentDate) < 7 then
{DateCreated} >= Date(Year(CurrentDate)-1, Month(CurrentDate)+6, 01)
Else
{DateCreated} >= Date(Year(CurrentDate), Month(CurrentDate)-6, 01)
Basically, depending on the current date, the report selects all cases in the past 6 months. The error says that the month value must be in the range 1 to 12. 6 should only be added to the current date if the current date is less than 7. It doesn't seem to be evaluating the if statement.
Please advise!!