Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here


Suppress Group Header B if Group Header a is blank

Suppress Group Header B if Group Header a is blank

Suppress Group Header B if Group Header a is blank

I am having difficulty suppressing a group header if another group header is blank/suppressed.

Originally I had a layout as follows:

Group Header a - contains client details
Group Header b - contains a subreport that showed details of the incoming calls from client that were received in the last 24 hours.

If the sub report in group header b was blank (because no calls had been received in the last 24 hours), my report was still showing the client details in group header a.
I can suppress the group header b section if the subreport is blank, but cannot work out how to suppress group header a if group header b is blank/suppressed.

After reading various other discussions, I understood that if you want to suppress a section when a subreport is blank, then the subreport would need to be in a section before the section you want to suppress.

So, I changed my layout as follows:

Group Header a - contains sub report showing details of calls in last 24 hours (sub report is suppressed if blank, and group header a is suppressed if blank)
Group Header b - contains client details
Group Header c - contains same subreport showing calls received in last 24 hours

So what I now need to work out is, how do I suppress group header b and c if group header a is suppressed?!

Any help would be greatfully received.

RE: Suppress Group Header B if Group Header a is blank

1. In Report Footer of GHa subreport place the following formula:


Shared NumberVar sCNT;

If      ISNULL(COUNT({Table.CallID}))
Then    sCNT := 0
Else    sCNT := COUNT({Table.CallID});

2. Suppress all sections in subreport
3. Format subreport to "Suppress if Blank"
4. Format section GHa to "Suppress Blank Section"
5. Format sections GHb and GHc to Suppress based on the following condition (click on x+2 button and add):


Shared NumberVar sCNT;

sCNT = 0 

Ope this helps


RE: Suppress Group Header B if Group Header a is blank

Hi Pete,

Many thanks for your reply.

Unfortunately it hasn't worked for me. I tried something similar (although not as neat!) and I experienced the same problem. When I look at the results in the subreport footer, it is not recognising when there are no calls and giving it a value of zero. It is counting when there are calls, but not when there isn't.

I have attached a screenshot of what it looks like if that helps? I have taken unsuppressed GHa and you can see that for the 'wardens handset' call it is finding a count. The fire alarm doesn't have any calls, but it is not counting as zero in GHa for that one.

Do you have any further ideas about what else I could try?

Kind regards


RE: Suppress Group Header B if Group Header a is blank

Hi Becki

Not sure what to suggest. I tested my approach and it definitely worked, but obviously it depends on determining when there are no calls. The screeshot doesn't really help, and I am not familiar with your data. My approach relies on the fact that no calls means no records and a null count. I need to understand what really indicates no calls.

If you are happy to post a copy of the report with saved data and explain what factor determines no calls, I'm happy to take a look.


RE: Suppress Group Header B if Group Header a is blank

Try adding a group section above GHa that establishes the value of sCNT as 0. Then in the subreport change the formula to:

If count(table.callID)>0 then
SCNT := count(table.callID)

Then use sCNT = 0 to suppress the client details section. Be sure to identify sCNT as a shared variable throughout.


RE: Suppress Group Header B if Group Header a is blank

Do you have the subreport limiting data to only the calls related to the Customer Group from the main report (by linking the subreport to the main report on Customer ID or similar)?

If not, that would result in the subreport always returning call volumes that would cause the recommended approach to fail.


Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close