I currently have a Database Command object in my Crystal Report that looks something like
SELECT *
FROM table
WHERE field = {?EndDate}
I want to change it so it looks more like
IF {?EndDate} = DATE '1900-01-01'
MyVariable = ADD_MONTHS(LAST_DAY(SYSDATE), -1)
ELSE
MyVariable = {?EndDate}
SELECT *
FROM table
WHERE field = MyVariable
I kind of get the idea of how to build a dynamic query to do this, but I don't know if that's really what I want to do. Could someone point me in the right direction, please? Thanks.