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
136 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
  • 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Next Full Week 4 74
Crystal Reports Swap Columns 2 50
Crystal Reports 2008 6 20
Crystal reports - Formula Field code need assistance with code 17 51
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…
This video demonstrates how to create an example email signature rule for a department in a company using CodeTwo Exchange Rules. The signature will be inserted beneath users' latest emails in conversations and will be displayed in users' Sent Items…
This is a video describing the growing solar energy use in Utah. This is a topic that greatly interests me and so I decided to produce a video about it.

943 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

Need Help in Real-Time?

Connect with top rated Experts

5 Experts available now in Live!

Get 1:1 Help Now