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

Posted on 2010-04-07
Medium Priority
Last Modified: 2012-05-09
Have an access DB that has the following fields:

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?

Question by:kelsanit
1 Comment
LVL 18

Accepted Solution

UnifiedIS earned 2000 total points
ID: 30044652
I think that will work, for your record selection

(callschedule = 1st of month AND DATEPART(d, Today) = 1)
(callschedule = weekly AND DATEPART(w, Today) = dayofweek)
(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.

Featured Post

Get expert help—faster!

Need expert help—fast? Use the Help Bell for personalized assistance getting answers to your important questions.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I hate sub reports and always consider them the last resort in any reporting solution.  The negative effect on performance and maintainability is just not worth the easy ride they give the report writer.  Nine times out of ten reporting requirements…
There have always been a lot of questions related to when Crystal Reports evaluates report components (such as formulas, summaries, cross-tabs, charts, to name a few examples). Crystal Reports uses a two-pass reporting process to provide greater …
This video tutorial shows you the steps to go through to set up what I believe to be the best email app on the android platform to read Exchange mail.  Get the app on your phone: The first step is to make sure you have the Samsung Email app on your …
If you are looking for an automated solution for backup single or multiple Office 365 user mailboxes to Outlook data file, then you can use Kernel Office 365 Backup & Restore tool. Go through the video to check out the steps to backup single or mult…
Suggested Courses

607 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question