Report Design
 Crystal Reports Forum : Crystal Reports for Visual Studio 2005 and Newer : Report Design
Message Icon Topic: How to suppress a group header when there is no da Post Reply Post New Topic
Author Message
crystal_reports
Newbie
Newbie


Joined: 25 Jul 2012
Online Status: Offline
Posts: 3
Quote crystal_reports Replybullet Topic: How to suppress a group header when there is no da
    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.
IP IP Logged
jkwrpc
Senior Member
Senior Member


Joined: 19 Jun 2007
Location: United States
Online Status: Offline
Posts: 432
Quote jkwrpc Replybullet 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.



IP IP Logged
crystal_reports
Newbie
Newbie


Joined: 25 Jul 2012
Online Status: Offline
Posts: 3
Quote crystal_reports Replybullet 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!
IP IP Logged
Crystal User
Newbie
Newbie


Joined: 25 Aug 2011
Online Status: Offline
Posts: 5
Quote Crystal User Replybullet 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
IP IP Logged
Post Reply Post New Topic
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum



This page was generated in 0.063 seconds.