Skip to Content
avatar image
Former Member

Suppressing sections

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.

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • avatar image
    Former Member
    Feb 19, 2017 at 07:51 AM

    Hello,

    You just need one tag field in main report query which would be on the base of sub report, it means if sub report has data this tag would be true else false, on base of it you can easily manage suppression of any section.

    Regards,

    Engr. Taseeb Saeed

    Add comment
    10|10000 characters needed characters exceeded

  • Feb 20, 2017 at 07:43 AM

    Hi Becki,

    Here's what you need to do:

    1. While in the 'Design' view, double click the Subreport on Group Header a.

    2. Create a formula with this code and place it on the Report Header of this Subreport:

    shared booleanvar x;
    if {any_string_field} = "" or isnull({any_string_field}) then
    x := True;

    3. Suppress all sections of this Subreport

    4. Go back to the Main Report > Right-click this Subreport > Format Subreport > Subreport tab > Check 'Suppress Blank Subreport'

    5. Go to the Section Expert > Highlight Group Header a > Check 'Suppress Blank Section'.

    6. Uncheck the 'Suppress' option if it's checked.

    7. While in the Section Expert, highlight Group Header b > Click the formula button beside 'Suppress' and use this code:

    shared stringvar x;
    x = True;

    -Abhilash

    Add comment
    10|10000 characters needed characters exceeded