It should schedule exactly as you ask it to, daily, weekly, etc.
If you're trying to get a report to run daily, then don't use a parameter for date comparison, just code the record selection formula with something like:
I have a solution for this, as I'm in the middle of doing it right now, it's not ideal, but it works.
Create a string parameter called {?Frequency}
In you record selection formula put something like :
(if {?Frequency} = "Daily" then
{PROC_DATE} = CurrentDate-1 else true) and
(if {?Frequency} = "Weekly" then
{PROC_DATE} in CurrentDate-7 to CurrentDate else True) and
(if {?Frequency} = "Monthly" then
{PROC_DATE} in Date(Year(DateAdd("m",-1,CurrentDate)),
Month(DateAdd("m",-1,CurrentDate)),01) to Date(Year(CurrentDate),Month(CurrentDate),01) else True)
Then, when you schedule in Crystal Enterprise, set the parameter to either Daily, Weekly or Monthly.
You build the logic into the report. On the CE side the report is scheduled to run at the end of the business day and you want to view the report the next day.
Add the logic into the record selection as:
{table.date_field} in currentdate
Now publish the report in CE and schedule it. The report captures the data based on the date field.
We do this for almost every report using code similar to the following:
//Switch statement allows for both 'On Demand' and 'Recurring' scheduled reports
//Switch used to derive the data cycle
{v_view.date} In
Switch
(
{?Schedule Type} = 'On Demand',{?From Data Date} To {?Through Data Date},
{?Schedule Type} = 'Recurring' And {?Date Period} = 'Weekly',LastFullWeek,
{?Schedule Type} = 'Recurring' And {?Date Period} = 'Monthly',LastFullMonth,
{?Schedule Type} = 'Recurring' And {?Date Period} = 'Annual',
Date((Year(CurrentDate) - 1),1,1) to Date((Year(CurrentDate) - 1),12,31)
)
Just set the appropriate parameters and create the recurring schedules, changing the parameters for each respective schedule. This selection criteria will also enable you to efficiently run the report for on-demand date periods (if you wanted to re-run a weekly report for a date period 3-weeks past, for example) without having to modify the report.
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.