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

Display Group when values null

Status
Not open for further replies.

IceRuby

Technical User
Jan 20, 2004
85
AU
Crystal XI connected to Access 2007

Simple question. I have a Group on names. I would like the group names to display regardless of no results.

e.g.
Customer 1 0
Customer 2 0
Customer 3 0

I have multiple group headings and would like to display each.

Standard way I would do this is
if isnull (GroupName ({x.customer})) then "There are no records to display" else
GroupName ({x.customer})

but I need to display all headings (4).

Have appplied a isnull formula to result counter.
if isnull (DistinctCount ({x.customer}, {x.order})) then 0
else DistinctCount ({x.customer}, {x.order})

Thanks
 
Hi,
Not so simple, since it is not clear what else is in the report - if the Names exist and you group on them, they will show up - What are you counting? Is there a preceding group before the Name one?



[profile]

To Paraphrase:"The Help you get is proportional to the Help you give.."
 
Hi
Purpose of report is to provide a count of records per customer within a parameter defined date range.

Report looks like
Group Header - Group #1 - Groupname{Customer}
Group Footer - Summarized Distinct count {x.orders)

The orders fields is string value.

When I run the report and there are no records the Group Footer is blank.

What I need it it to look like is:

Group Name Order distinct count
Customer #1 2
Customer #2 0
Customer #3 21
Customer #4 0

So in other words I need all group names to be displayed regardless if there are some or no records to display.

At present it does return only names / values for customers containing records for that period.

Thanks in advance



 
Hi,
If no order records exist for a particular customer within the chosen date range, there would be no Customer name to show.

Perhaps joining the table to itself by a left-outer join on Customer name and using the Customer name from the left-most table as the group name and only applying the selection criteria to the right ( alias) table would get you all the customer names regardless of the existance of an order within the date range.( Not sure the count would work..)



[profile]

To Paraphrase:"The Help you get is proportional to the Help you give.."
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top