Avatar of Tina K
Tina K
Flag for United States of America asked on

Crystal Report GH Suppress Formula not acting as expected

Hi Experts;

I have a three part formula used to suppress a group header when all of that group's details are suppressed. I had to use a three part formula since the actual suppression condition is a formula, which can't be summarized.
The three part formula itself is working fine, I've got the reset formula in the group header, the increment/counter formula in the details, and the totals formula in the group footer.
However, the group header suppression seems like it's suppressing based on the count of the previous group.
Here's without any GH's suppressed:
suppress1I blocked out the actual customer name, but you can see their ID number to the very left.  All customer group headers should remain unsuppressed except for C01453 and C01454 - all the detail records are suppressed and the formula @totals accurately shows 0.00
When I place the formula {@totals}=0 in the suppress area of the section expert for the group header, here's what I'm getting:
suppress2Group header for C01067 got suppressed, and while C01454 did suppress as expected, C01453 is still showing and should not be.
I've experimented with my formulas in all the various header/footer sections, and nothing seems to give me the result I'm expecting.
Any advice is appreciated!
Crystal Reports

Avatar of undefined
Last Comment
Tina K

8/22/2022 - Mon
Tina K

ASKER
Let me know if you can't see the pics - they were visible when I previewed my post, but they don't appear for me now.  Frustrating
Mike McCracken

The problem is the way a report is rendered.

The group header section is completed before the first detail record for it is evaluated.  Your summaries aren't done until the last detail record is evaluated thus the value you need for suppressing the group header isn't evaluated and available for testing until all the detail records thus the group header cannot be suppressed based on the value for its records.

However the group header suppression will be evaluated using the value currently available which is based on the previous group detail records.

If you need to suppress the group header based on records being displayed in the group you need to develop a formula that can be evaluated in the group header.

Can you scrub the report so you can upload the rpt with data?  If you think that is too difficult then upload the rpt file without data so we can see the formulas used to control the suppression.

mlmcc
Tina K

ASKER
I've never tried attaching a whole report, let's give it a try....
EDI-Cancellations.rpt
I started with Experts Exchange in 2004 and it's been a mainstay of my professional computing life since. It helped me launch a career as a programmer / Oracle data analyst
William Peck
Mike McCracken

I took a quick look at the formulas used to calculate the totals formula.  Several of them use the MAXIMUM function which is a Print Time function.

The only way I can think to do this is to create a subreport that calculates the value and returns it to the main report as a shard variable.

I'll look at it in more detail tonight.

mlmcc
Tina K

ASKER
Thanks mlmcc.  If you do come across anything, I'll respond on Monday, I don't have access to CR on the weekends.
Mike McCracken

That's fine.  It will probably take me most of the weekend to find time to get to this.

I think I can use the report itself stripped of everything not related to calculating the value.

mlmcc
⚡ FREE TRIAL OFFER
Try out a week of full access for free.
Find out why thousands trust the EE community with their toughest problems.
ASKER CERTIFIED SOLUTION
Mike McCracken

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
Tina K

ASKER
Hi mlmcc - My system won't let me open the attachments due to security concerns.  Any other ideas how I can access them?
Tina K

ASKER
Hang on - never mind - used a different browser and was able to open the attachments.  Sorry about that.
Tina K

ASKER
Perfect, thank you so much, this is exactly what I was trying to do!
All of life is about relationships, and EE has made a viirtual community a real community. It lifts everyone's boat
William Peck