Print Page | Close Window

How to suppress a group header when there is no da

Printed From: Crystal Reports Book
Category: Crystal Reports for Visual Studio 2005 and Newer
Forum Name: Report Design
Forum Discription: The best way to design a report and problems you have encountered
URL: http://www.crystalreportsbook.com/forum/forum_posts.asp?TID=17110
Printed Date: 01 May 2024 at 12:32pm


Topic: How to suppress a group header when there is no da
Posted By: crystal_reports
Subject: How to suppress a group header when there is no da
Date Posted: 25 Jul 2012 at 7:39am
Good Day,

I am banging my head against the wall trying to figure out how to format my report. I am sure this is something easy to do, but for the life of me, I am stuck!

I am using CR XI.

Here is the report format:

GH1 Affected Service: Database
GH1 Affected Service: FKK APPLICATIONS
GH2 Affected CI: BISS
GH3 IM001234 (6)
GH2 Affected CI: MAINTOWN
GH3 IM001235 (2)
GH1 Affected Service: FKK BUSINESS
GH2 Affected CI: ALLIANT
GH3 IM001236 (2)
GH1 Affected Service: FKK MS OFFICE
GH1 Affected Service: FKK NETWORK
GH1 Affected Service: FKK OS

How I would like the report to look:


GH1 Affected Service: FKK APPLICATIONS
GH2 Affected CI: BISS
GH3 IM001234 (6)
GH2 Affected CI: MAINTOWN
GH3 IM001235 (2)
GH1 Affected Service: FKK BUSINESS
GH2 Affected CI: ALLIANT
GH3 IM001236 (2)

I don't want to see the Group Headers in GH1 that have no information in GH2 or GH3.

I don't know how to suppress the GH1!

Help!!
Any help is greatly appreciated.



Replies:
Posted By: jkwrpc
Date Posted: 25 Jul 2012 at 8:02am
Open the Section Expert. It has a check box for 'suppress a blank section'. If that does not give you what you want then there is a formula button just to the right. Create a formula that using a field that indicates whether the section is blank or empty. Possibly
{AffectedService} = ""

The key is suppression by formula works (suppresses) when the formula is true. for example 1+1 = 2 since it is true it will suppress the section.

Also keep in mind you need to do this for each section you want suppressed.

However, looking as what you want, I suggest you take a look at your groups and make sure they are giving you the layout you want. For example having a GRP1 be Affected Service should eliminate the needs for the other GH and GF.





Posted By: crystal_reports
Date Posted: 25 Jul 2012 at 9:30am
Hi there,

Thank-you for taking the time to reply to me.

The report has the first group of Affected Service. The second group is the Affected CI the third group is the number of tickets for the Affected Service and Affected CI.

The suppress a blank section does not work because there will always be a list of affected services for this report.

In an ideal world, I would be able to set up a formula like
if Group(Affected CI) is null then True.

Thanks again for your help!


Posted By: Crystal User
Date Posted: 05 Aug 2012 at 11:40pm

Set up a flag and increment the counter for each group header in GH2.
Similarly set up a flag and increment the counter for each item in Details

Create a formula:GH2_flag
if GH2is not null then
1
else
0

Place this formula in Gh1section.Go to section expert>>supress>>click on the box adjacent to it>>
GH2_flag=0

Similarly repeat this for Detail section.

Hope this helps.

Thanks,
Lakshmi



Print Page | Close Window