I am converting a Crystal 10 report to Crystal 2008. The report uses a command object. THe report has a paramter that allows the user to select for example last full month. In 2008 I am getting a error message that I have a data type mismatch between the then/else statement. Can someone help with this issue?
This is the code I am using.
CASE
WHEN '{?Date Range Option}'= 'Last Full Week'
THEN (cal.calendar_date - cal.day_of_week- 6)
WHEN '{?Date Range Option}'= 'Last Full Month'
THEN ADD_MONTHS((cal.calendar_date - cal.day_of_month)+1,-1)
WHEN '{?Date Range Option}'= 'Custom Date Range'
THEN {?Start DATE}
ELSE cal.calendar_date
END AS startDate,
CASE
WHEN '{?Date Range Option}'= 'Last Full Week'
THEN (cal.calendar_date - cal.day_of_week)
WHEN '{?Date Range Option}'= 'Last Full Month'
THEN (cal.calendar_date - cal.day_of_month)
WHEN '{?Date Range Option}'= 'Custom Date Range'
THEN {?End DATE}
ELSE cal.calendar_date
END AS endDate,