Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Technical Questions
Message Icon Topic: Limiting Groups per page Post Reply Post New Topic
Author Message
Vack
Newbie
Newbie


Joined: 22 Oct 2008
Location: United States
Online Status: Offline
Posts: 24
Quote Vack Replybullet Topic: Limiting Groups per page
     Posted: 15 Apr 2009 at 6:14am
Is there a way to only have two groups print per page?
 
I have a report I've grouped by item number.
 
 
I only want two item numbers to print per page.
IP IP Logged
lockwelle
Moderator
Moderator


Joined: 21 Dec 2007
Online Status: Offline
Posts: 4374
Quote lockwelle Replybullet Posted: 15 Apr 2009 at 6:38am
shared variable.  increment it in the group header.
in the 'New Page Before' option, if the shared variable exceeds a value, reset the variable and return true.  I would create a section below in the group header so that I could increment the counter in the top section and ensure that the new page is being processed, I have had unpredictable results putting data related formulas in the page header section.
 
for the new page before formula, something like this should work:
shared numbervar itemCount;
local booleanvar newPage :=false;
if itemCount >2 then (
  newPage := true;
  itemCount :=0;
);
 
newPage
IP IP Logged
Vack
Newbie
Newbie


Joined: 22 Oct 2008
Location: United States
Online Status: Offline
Posts: 24
Quote Vack Replybullet Posted: 15 Apr 2009 at 8:27am
Actually what I ended up doing was going into Change Group and checking "Keep Together". That seemed to have solved my problem. I just didn't want one of the groups to be cut off at the bottom of the page.
 
Thanks for the reply
IP IP Logged
lockwelle
Moderator
Moderator


Joined: 21 Dec 2007
Online Status: Offline
Posts: 4374
Quote lockwelle Replybullet Posted: 15 Apr 2009 at 8:30am
OH....that will do it.  All depends on what you really want Crystal to do.
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