Suppressing Group Headers In a Crystal Report

Hi
I have a new requirement where i need to show more than one group in a page and when both groups have same headers i should suppress the group header. if they are different i need to show them. Both the group header and details are a CrossTab reports.

Is there any kind of formula i should use or any section/group/header settings change? :?

Please help me.

waititng for your replies.

Regards,
Mallikarjun


mallikarjun1017 (BOB member since 2011-08-25)

If the headers are cross-tabs, I doubt there’s a way to see if they’re the same. What’s in the cross-tab and what constitutes a group?

-Dell


hilfy :us: (BOB member since 2007-04-16)

Hi,

Need some more Information.Do you want to display the group header one time If they are same or, you do not want them at all If they are same.

Let us know please

Regards
Raj Mahesh


9052323420 (BOB member since 2012-01-19)

Hi,
I want to display group headers when they are different in a page.

thanks
Mallikarjun


mallikarjun1017 (BOB member since 2011-08-25)

You’ll need to create a formula that will compare the fields you display in the group header with the ones in the previous group. Suppress if they’re all the same. The trick is, you’ll also need to check for “PreviousIsNull” or you’ll end up with errors on the first record. The formula looks something like this:

Not PreviousIsNull({table.field1})
and Not InRepeatedGroupHeader
and {table.field1} = Previous({table.field1})
and {table.field2} = Previous({table.field2})
and

Note that you do NOT need an “If…Then” here - the statement will evaluate to True or False without it. The line for “InRepeatedGroupHeader” needs to be there if you have your group header set to repeat on every page.

Go to the Section Expert, click on the formula button to the right of “Suppress” (do NOT check Suppress!) and enter the formula there. It will evaluate to True when everything is the same, thus suppressing the section.

The challenge with this is that this will happen for every group header, not just the second one on a page. This should only a problem if the group starts at the top of a page.

You could try creating a formula that includes one of the text fields that in your group header and ToText(PageNumber). You then compare that formula instead of the field value in your suppression formula (I’m not absolutely certain whether Crystal will let you use PageNumber there…). If the group is on a new page, it should appear.

-Dell


hilfy :us: (BOB member since 2007-04-16)

Hi,

Thanks for the reply.

 I tried the formula you mentioned. It is not working. I have only one field in crosstab group header. I want Group Header crosstab to be suppressed if they are repeating in the same Page. If they are different it should display.

I am attaching the screenshot of design and report.

Please Help…

Thanks
Mallikarjun
Group Header.png
Report.png


mallikarjun1017 (BOB member since 2011-08-25)