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

Select dates within a range if they have *no* entry in database

Status
Not open for further replies.

dgenne

IS-IT--Management
Oct 8, 2002
8
0
0
US
Hello All!
I've been trying to figure this one out and not having much luck I have a report that queries the user for a start date and an end date. Various totals are calculated and that part works fine. What I am trying to do is then show the user what dates in that range were missing data.
Quick synopsis of report: within date range show sales this year, sales last year, and variances by dollar and %, grouped by store.
The problem is some of our stores are not good about getting their numbers into the database and so at any given moment they may be more or less accurate. I would like to have something displayed that would show that store 1 is missing days 11/2/2002 and 11/8/2002. while store 2 is missing 11/20/2002, 11/21/2002, 11/22/2002 etc.
The Database has data for days that have been received, but nothing for days that have not been received. I would like to avoid using a stored procedure or creating a "Calendar" table. (Rights problems)
Is there a formula that I could use in a report to compare the contents of the date field in the table and print lines for instances where the date is not found between the start date and the end date, grouped by store?
Thanks in advance!
Douglas Genne
dgenne@thepalm.com
 
You could capture the null and or blank fields that will be stored and then compare them.
 
I'm not sure I follow what you mean there stormtrooper. The dataset I will be reporting on does not have blank or null entries for the dates in question. There are no entries at all. I'm not sure how I could compare the missing days to my date range within Crystal (If that's what you were suggesting)...I may just have to ask the DB developer to add a stored procedure that calculates what I need in temp tables or have him add a calendar table... what I was trying to avoid! Thanks!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top