Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Technical Questions
Message Icon Topic: Suppress Sub report when no data Post Reply Post New Topic
Author Message
cheenu_vasan
Newbie
Newbie
Avatar

Joined: 06 Apr 2011
Location: India
Online Status: Offline
Posts: 16
Quote cheenu_vasan Replybullet Topic: Suppress Sub report when no data
     Posted: 14 Sep 2012 at 8:41am
Am using crystal report 10.0.0.533. I have some multiple sub report in my single report source file.
 
Main Report
Sub rpt 1
Sub rpt 2
Sub rpt 3
Sub rpt 4
Sub rpt 5
 
Am facing  a problem here when the sub rpt 4 and 5 have no data there comes a blank page in my report output.
 
I have tried set the following property:
 
  • Right click Sub report ->> Format Sub Report ->> Goto Sub Report tab --> Check the option "Suppress Blank Sub report"
  • Open the sub report, go to Report menu ->> Section Sub report ->> Set the Suppress Blank Section for each section of that sub report

After the above setting, am still getting the blank page when the sub rpt 4 and 5 have no data.

In the sub report, I have only the Column Labels and Field labels with formatting details (Box, line etc) and only one sub report has the formula, Summary field (sub rprt 5).
 
I See or heard from the team (which am not sure Confused) that a formula will solve this issue that tracks of record count of the sub report ????
 
Regards
Srinivasan B
 
 
Thanks & Regards
Srinivasan B
IP IP Logged
cheenu_vasan
Newbie
Newbie
Avatar

Joined: 06 Apr 2011
Location: India
Online Status: Offline
Posts: 16
Quote cheenu_vasan Replybullet Posted: 17 Sep 2012 at 10:19pm
Any suggestions or workaround will be appreciated... may be i need to explore more settings apart from the previous post.....
Thanks & Regards
Srinivasan B
IP IP Logged
Sastry
Moderator
Moderator
Avatar

Joined: 16 Jul 2012
Online Status: Offline
Posts: 537
Quote Sastry Replybullet Posted: 17 Sep 2012 at 11:31pm
Hi
 
In your sub reports, you also have to suppress the values (report labels,headings etc) using a formula.
 
Go in Report Menu--Section Expert--Suppress -- Formula editor and write the follwoing :
 
if Count({Yoursubreportfield)}) > 0 then false else true
 
This will suppress your headers and footers or any other secitons which has static information.
 
Now in the main report go in section expert and check 'Suppress Blank Sections'
 
Also check you have applied New Page before or After for any of your sections.
 
Thanks,
Sastry
IP IP Logged
jms493
Newbie
Newbie


Joined: 11 Apr 2012
Location: United States
Online Status: Offline
Posts: 3
Quote jms493 Replybullet Posted: 19 Sep 2012 at 7:13am
Right click on Subreport, click Format, click Subreport tab, click the check box on "Suppress Blank Subreport"
IP IP Logged
cheenu_vasan
Newbie
Newbie
Avatar

Joined: 06 Apr 2011
Location: India
Online Status: Offline
Posts: 16
Quote cheenu_vasan Replybullet Posted: 20 Sep 2012 at 1:33am
Originally posted by jms493

Right click on Subreport, click Format, click Subreport tab, click the check box on "Suppress Blank Subreport"
I tried this option but it didnt worked effective.
 
May be i need to try create a formula under the Suppress report (Report Menu--Section Expert--Suppress ) to suppress the static information.
 
Am getting the blank page (when one of subreport is having no data) that has only the report Header and Footer that comes with all the pages of the report.


Edited by cheenu_vasan - 20 Sep 2012 at 1:34am
Thanks & Regards
Srinivasan B
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