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

How can I group on a date value even if there is no data for that date

Status
Not open for further replies.

sk8er1

Programmer
Jan 2, 2005
229
US
I have a report that is working quite well. The user has asked me to make a modification...not sure how to do it.

4/1 4/4 4/5 4/6 4/7 4/8
--- --- --- ---- ---- ----

It is grouping on the date, but they want the date to display even if there is no data for that date. Notice 4/2 and 4/3....

4/1 4/2 4/3 4/4 4/5 .....
--- --- --- --- ---
xx rr g4
f3 v3 nb
 
The report looks like a crosstab. If it is, then it will not group on anything that isn't there. The only possibility is to create a dummy record for each date, if you are allowed to change the database.

Failing this, you could get the same effect using a 'mock-crosstab' - use 'Search' to get details, and you also should have an example sent by Crystal, included with their Crosstab examples.

Or you could suggest a summary at the end of the report that would show dates that were missing. This might need to be done by a subreport, depending on whether or not the database included 'working days'.

[yinyang] Madawc Williams (East Anglia, UK) [yinyang]
 
Its not a cross tab, its grouping by the date. The trouble is if there is no data for the date, it does not display the column. Thats logical to me, but the user needs to see the blank column.
 
I've never used columns. My other comments still apply - Crystal groups only on data that actually exists.

If you can change the database, set up a table of the days for which a column should appear. Do a 'left outer' link from these dates to the data, meaning that it will still appear without details.

[yinyang] Madawc Williams (East Anglia, UK) [yinyang]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top