Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Report Design
Message Icon Topic: Conditional page breaking Post Reply Post New Topic
Author Message
jhenrik
Newbie
Newbie


Joined: 24 May 2010
Location: United States
Online Status: Offline
Posts: 1
Quote jhenrik Replybullet Topic: Conditional page breaking
     Posted: 24 May 2010 at 10:33am
Hello.  I have a subreport with a NEW PAGE BEFORE option checked.
 
The problem is, if the sub-report query returns no data, then the page break still occurs and prints a blank page (report and group headers still print, but the detail section is blank).   I need to force a page break when I hit this sub-report, but I don't want the blank page if there is no data in the sub-report.
 
How do I tell Crystal to only perform the page break if the sub-report query has data? 
 
Thanks!


Edited by jhenrik - 24 May 2010 at 10:34am
IP IP Logged
lockwelle
Moderator
Moderator


Joined: 21 Dec 2007
Online Status: Offline
Posts: 4374
Quote lockwelle Replybullet Posted: 25 May 2010 at 2:40am

either place a flag in your dataset stating there is no subreport data (stored proc could do this, joining to the tables can't) or run the subreport (or a slightly modified one) to return a count of records via a shared variable and then programmatically enable/disable the pagebreak/display of the 'true' subreport.

 
HTH
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