I think that the answer to your question is to use a parameter and set the default value to something like 1/1/1970, then in the Report->Edit Record Selection->Record use:
If {?MyDateParm} = cdate(1970,1,1) then
{table.date} = currentdate-1
else
{table.date} = {?MyDateParm}
When the report is opened it will prompt for a date, which if they don't adjust it will default to yesterday, otherwise they can enter a date.
Unfortunately Crystal is VERY weak with regards to parameters, so to prompt intelligently you need external code (write something or use a 3rd party viewer).
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.