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

Suppress group heading when no records

Status
Not open for further replies.

ColinGregory

Technical User
Feb 16, 2001
39
US
ohhhh my head hurts....

How do you suppress a group header if the group contains no records?
 
Try conditionally suppressing the section with

IsNull Count({Field}) or Count({Field},{Group}) < 1

Naith
 
That should be

IsNull Count({Field},{Group}) or Count({Field},{Group}) < 1

Naith
 
Hi Naith

Thanks for the reply. Unfortunately I can't get it to work. (Error message &quot;The summary/running total field could not be created&quot;)

More info...

All my groups will have some records in but I've suppressed the detail section to show only records where a result is out_of_spec.

I've got loads of groups with no out_of_spec results but I can't hide the group header. For the formula in your reply - Count({field},{Group}). I assume that {field} = any field within my group but what is the format for {Group}. I've been putting in the Group #1 Name.

Sorry for being a bonehead but I'm having the kind of day where I can't even spell my name right.
 
You're right; {Field} is any mandatory database field which would otherwise normally appear in all groupings. For the group condition, you don't want to select the object as it is called when it's a group, as it sounds like you're incorporating the string 'GroupName' in your formula. You just want the orignal grouping field name as it is in your database, or formula list.

i.e.

Count({Field},{Original.GroupingFieldName})

as opposed to

Count({Field},GroupName({Original.GroupingFieldName}))

Naith
 
If a group has no records, the group should not be on your report at all. You do not need to do anything to suppress a group header in this case.

Are you doing something funky like conditionally suppressing the records, so they are there, just suppressed? If so I would suggest that you unsuppress them and use a record selection formula to exclude them from your report entirely. Software Training and Support for Macola, Crystal Reports and Goldmine
251-621-8972
dgilsdorf@mchsi.com
 
I agree that groups with no records shouldn't be on the report but I don't know how I can avoid it.

My aim is to include only records that pass a formula in the details section. Is there a way to run the formula before printing the records? The formula doesn't show up in the list of available fields in the select expert.
 
What is the formula? What do you mean by &quot;Pass a formula in the details section&quot;?

You never answered by question - are you suppressing records instead of excluding them from the report with a record selection formula? Software Training and Support for Macola, Crystal Reports and Goldmine
251-621-8972
dgilsdorf@mchsi.com
 
Fixed it at last.

I followed your suggestion and transferred the bulk of my formula from the details section to the select expert. Crystal now only selects records from the database which meet the criteria rather than suppressing those which don't meet the criteria.

Thanks very much Naith and Dgillz for taking the timeout to reply.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top