Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Report Design
Message Icon Topic: Sub Report Suppression Post Reply Post New Topic
Author Message
chris
Newbie
Newbie


Joined: 02 Apr 2008
Location: United Kingdom
Online Status: Offline
Posts: 35
Quote chris Replybullet Topic: Sub Report Suppression
     Posted: 22 Nov 2011 at 4:43am
Hi all,
 
I have a subreport that I would like to suppress when it has no records returned. I know how to do this, however, the problem I have is that the subreport itself contains suppressed records and this is making my report not work as expected.
 
The suppress blank subreport functionality appears to just take the total number of records returned in the subreport to determine if the subreport is blank regardless of whether those record have been suppressed.
 
Can anybody think of a way of suppressing a subreport that may contain records but all of which have been suppressed.
 
Hope that made sense.
 
Chris
 
 
IP IP Logged
lockwelle
Moderator
Moderator


Joined: 21 Dec 2007
Online Status: Offline
Posts: 4374
Quote lockwelle Replybullet Posted: 23 Nov 2011 at 4:57am
put the subreport in its own section.
go to the section expert for that section and select 'suppress blank section'
 
HTH
IP IP Logged
chris
Newbie
Newbie


Joined: 02 Apr 2008
Location: United Kingdom
Online Status: Offline
Posts: 35
Quote chris Replybullet Posted: 24 Nov 2011 at 3:36am

The subreport is already in its own section and "suppress blank subreport" is already ticked.

The problem is that the subreport is not blank in that it returns one row. However, that one row is suppressed as a result of a formula that I have entered in the Suppress option of Section Expert so the actual number of rows shown on screen is zero.
 
The subreport is therefore not being suppressed because it thinks there is one record.
 
What I need is for the subreport to be suppressed if the number of rows shown is zero (after suppression has taken place).
 
 
IP IP Logged
lockwelle
Moderator
Moderator


Joined: 21 Dec 2007
Online Status: Offline
Posts: 4374
Quote lockwelle Replybullet Posted: 28 Nov 2011 at 5:03am
put the suppress if blank in the subreport as well...
 
The other response would be to look for prior posts on how to suppress a subreport.  I don't use subreports too often, and usually when i do, I don't want to suppress them.
 
 
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 28 Nov 2011 at 7:29am
if, in the subreport, you can determine if all records are suppressed or not and then conditionally suppress all sections of the subreport based on that answer you can set the subreport to supress when blank and also set the section in the main report to supress when blank.
IP IP Logged
lockwelle
Moderator
Moderator


Joined: 21 Dec 2007
Online Status: Offline
Posts: 4374
Quote lockwelle Replybullet Posted: 28 Nov 2011 at 1:10pm
I knew I was on the right track...
 
I just don't suppress subreports too often.
IP IP Logged
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