Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Using last run date to control input data

Status
Not open for further replies.

regid

Technical User
Jun 2, 2005
3
US
We have CE10 and would like to use only 1 report based on entry date to display data. Currently, we have 2 rpt jobs -- 1 for Mon that gets data from Fri-Sun and the other report job for Tues-Fri that gets the previous day's data. This works okay but then with Monday holidays and "system processes" we would have to write a special makeup job to handle anything that does not meet the criteria of these jobs. What I'd like to do is write 1 report job to use the "last run date" for the job, along with current date to be the parameters/filters for selecting data for the report. I know in other programs we do this but since I am new to CE10 -- do you have thoughts/ideas? Anything would be appreciated.
 
Why not just schedule a report and set it for every business day, and use something like:

if day(currentdate) < 2 then
(
{table.date} >= currentdate-3
and
{table.date} <= currentdate-1
)
else
(
{table.date} = currentdate-1
)

Now it will always run each business days activity except on Monday which brings back the weekends data.

Scheduling is the key.

-k
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top