Solved

How do I create a "group" based on a date value that may not exist in the record set?

Posted on 2014-09-10
5
142 Views
Last Modified: 2014-09-18
Gurus,

I'm stumped.  I need to create a "group" based on a date/day of week.  I know you can insert a group for a date field but I need to display all of the dates even if there are no values included in the record set.

Example:

Monday:   0 contacts created
Tuesday:  2 contacts created
Wednesday:  0 contacts created
Thursday:  5 contacts created
Friday:  0 contacts created


Any help would be greatly appreciated

Steve
0
Comment
Question by:SStroz
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
5 Comments
 
LVL 100

Expert Comment

by:mlmcc
ID: 40315563
There are really 2 ways to do this.

The easy way is to add a table to the database that has all the dates in it.  Call it AllDates.

You then use that as the first table in the report and left join your other tables to it.

DO the date filtering on the AllDates table.

The second way is a little more complex.
It involves a formula in the group header that evaluates the date from the current record and add lines for the missing dates until the current date is found.  In the report footer a similar formula is used to account for any dates after the last one in the data until the range of dates is reached.

I'll try to find my example.

mlmcc
0
 
LVL 100

Accepted Solution

by:
mlmcc earned 500 total points
ID: 40315568
Here is the sample report

mlmcc
IncludeMissingDayGroup.rpt
Missingdays.xls
0
 
LVL 7

Author Comment

by:SStroz
ID: 40318099
Michael,

I can't seem to download the files.  ??

When I click on them it opens the files in a web browser.  Right clicking asks me to "save as" htm.

Any ideas


Steve
0
 
LVL 100

Expert Comment

by:mlmcc
ID: 40318204
Sorry about that.  EE has an issue right now with some download types.

Right click the file
Click SAVE AS
Change the file type/extension (rpt for the report, xls for the data).
Click SAVE

You should then be able to open the files in the correct application

mlmcc
0
 
LVL 7

Author Closing Comment

by:SStroz
ID: 40330327
Thanks Michael!
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Crystal Reports: 5 Tests for Top Performance It is complete, your masterpiece report.  Not only does it meet your customer’s expectations, it blows them out the water, all they want is beautifully summarised and displayed in a myriad of ways. …
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…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

737 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