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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Scheduling report, suppress out of season

Status
Not open for further replies.

tful282

Programmer
Jun 26, 2001
42
US
I have been scratching my head all morning over this.
I am running CR 8.5 hitting an Oracle 8.1.7 db.
I have created a scheduling report which brings displays a 'calendar' of jobs that are required on a regular schedule for a given time period.
e.g. Job#1 is scheduled every 1 month on the 1st
Job#2 is scheduled every 2 weeks next due 2/1/04

The schedule is generated in a view from a 'job template' that has the job and frequency info. So if I run the report for a 1 year period, i will see 12 occurences of Job#1 and 26 occurences of Job#2.
The tricky part is that I also have some jobs that have an active season:
e.g. Job#3 is scheduled every 1 month, but only for the period Apr 1 thru Jun 30.
My view is not smart enough to check the active season for jobs. I need to prevent Job#3 from showing up outside of this range. The season info is stored as a begin & end month (string) and day (number). Also note that the period could span a year-e.g. Dec 1 thru Feb 28.

Any ideas on how to do this either at the database level, or in the records selection criteria?
 
In the record selection formula select only job schedules that occur after the start season and before the end season for that job.

Cheers,
- Ido

CUT, Visual CUT, and DataLink Viewer:
view, e-mail, export, burst, distribute, and schedule Crystal Reports.
 
But I don't have the actual season in a date format, all I have is a beginning day(number) & month(string) and an ending day & month, no year. So I cannot simply compare the scheduled date to the season, it needs to be calculated somehow.
 
Use Month(Job_Schedule) to convert the Job Schedule date to just a month

Use Day(Job_Schedule) to convert the Job Schedule date to just a day.

Use these pieces to do the comparisons with the start and end month and day...

Cheers,
- Ido


CUT, Visual CUT, and DataLink Viewer:
view, e-mail, export, burst, distribute, and schedule Crystal Reports.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top