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
139 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

Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

One of a set of tools we are providing to everyone 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. …
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 shows how to quickly and easily add an email signature for all users on Exchange 2016. The resulting signature is applied on a server level by Exchange Online. The email signature template has been downloaded from: www.mail-signatures…
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…

837 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