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

How do u get all specified group names to appear even if group has no

Status
Not open for further replies.

rebrov

Programmer
Jul 16, 2001
2
GB
I need a report which has 6 specified groups e.g
0-15mins
15-30mins

etc however one group header lets say for arguments sake, 0-15mins does actually not have any data in the database that would appear in this group, howver i want the header to appear and then zeros to appear in all the following columns so you can get a good analysis e.g

group countofsessions averagelenght
0-15 0 0
15-30 8 0:58:00
30-60 1 0:10:00


i have been trying my hardest for days to get this work like the above but instead all i get is the groups which match details, If anyone can help you would be saving somebody from going mad.

Thankyou for your assistance
 
Hi,

The purists view would be to create an extra table with the full set of required times and then link from this table to your existing table with an outer join.

This is fine if you have the permission to create your own tables within the database!

Geoff

 
There is no direct way. CR requires that there be one record for each group.

You could put into the existing table, one dummy record (with 0 values) for each group and make sure that it is always included in the report.

Or you could hard code a conditional Grand total for every cell of your table and then print all the grand totals in the report footer, next to static labels. (You can do this with subtotals in the Group Footer).

It is hard to get an average of conditional totals because the else is always 0 (not null) but there is a technique posted here somewhere that allows you to fool your formula into returning a null value as the else. Ken Hamady
On-site custom Crystal Reports Training and Consulting.
Quick Reference Guide to using Crystal in VB.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top