Crystal Reports - Select data in table based on current week number and business days

Have an access DB that has the following fields:

customerid
customername
contact name
contact number
callschedule : (weekly, bi-weekly, 1st of month)
dayofweek : (monday, tuesday, wednesday, thursday, friday)

I need to create a report that will run daily to provide a list of customers they should call that day.  With the filds listed is that possible? If not should I redeisgn the table data?

kelsanitAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

UnifiedISCommented:
I think that will work, for your record selection

(callschedule = 1st of month AND DATEPART(d, Today) = 1)
OR
(callschedule = weekly AND DATEPART(w, Today) = dayofweek)
OR
(callschedule = bi-weekly AND DATEPART(ww, Today) Mod 2 = 1 AND DATEPART(w, Today) = dayofweek)

For bi-weekly, this would show for odd numbered weeks.  Another column could be added to indicate whether the bi-weekly is odd or even numbered weeks and incorporated into the "Mod" formula.
You'll also have to consider when the first of the month on a weekend.

Another way to handle this would be to have a field that said how many days in between calls and another field with the date of the last call.  Then you could just look for records with a date difference greater than the threshold.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Crystal Reports

From novice to tech pro — start learning today.