Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Report Design
Message Icon Topic: Controlling the page breaks based on records Post Reply Post New Topic
Author Message
teekK
Newbie
Newbie


Joined: 08 Jun 2012
Online Status: Offline
Posts: 2
Quote teekK Replybullet Topic: Controlling the page breaks based on records
     Posted: 08 Jun 2012 at 9:40pm
Hi,
 
I'm designing a report to print quotes and am having trouble getting the page breaks right.
 
A product code record that we use is 'TEXT' and it is used to describe a section of the quote. For example 'TEXT' might be used with the description "Bedroom 1" (so it's not really a product code, but is recorded as one).
 
Following 'TEXT' would be all the products that go in "Bedroom 1". For Example
Queen Bed
Side Table
TV
etc.
etc.
 
The report is set up in a way that there are 2 dfferent group headers. Group Header #1A is suppressed when the item code is not equal to "TEXT" and Group Header #1B is suppressed when the item code is equal to "TEXT'. Group Header #1B has the quantity, item comments and pricing information and Group Header #1A just has the item description.
 
The problem occurs when the report looks something like:
<pg1>
Bedroom1
Queen Bed
Side Table
TV
etc.
etc.
Bedroom2
<pg/1>
<pg2>
King Bed
etc.
etc.
 
In essence, what I'm looking for is so that the 'TEXT' record is never the last record to print on the page. I don't mind if following 'TEXT' is one item on the same page and the rest on the next page. But, it just looks really dumb to have a Description all the way at the bottom of the page.
 
Thanks for the help.
 
 
 
IP IP Logged
lockwelle
Moderator
Moderator


Joined: 21 Dec 2007
Online Status: Offline
Posts: 4374
Quote lockwelle Replybullet Posted: 11 Jun 2012 at 5:57am
it sounds like you want 'keep together'
 
since both of the your headers in the same group, this will make them behave the same.
 
go into the grouping, I get there by right clicking on the group and selecting change group. On one of the tabs, depending on version, there is a Keep Together, check that.
 
CR will now attempt to keep all of one group together on the same page, which tends to work great, unless you have a really big group,  then you might get a page break that one wouldn't think is necessary....
 
HTH
IP IP Logged
teekK
Newbie
Newbie


Joined: 08 Jun 2012
Online Status: Offline
Posts: 2
Quote teekK Replybullet Posted: 13 Jun 2012 at 8:10pm
Thanks for the reply and it definitely helped to know that there is a 'Keep Together' in section expert and a 'Keep Group Together' as well.
 
It's definitely an improvement, because groups aren't being split apart now.

But, the problem I'm still having is that in one group there is either (1) a TEXT code or (2) an actual item code.
 
I need it so that if (2) has (1) directly before it then it won't put (1) on the bottom of the first page and (2) at the top of the second page but that it puts (1) and (2) on the same page.
 
Sorry, I'm not being very clear. But each group is kind of like an IF statement. Where if the code is TEXT we'll use these group headers, but if not, then we'll use another set of group headers.
 
In another sense, I don't ever want the TEXT code group being at the bottom of a page.
 
Does that make sense? Is there any way to do what I'm asking?
IP IP Logged
lockwelle
Moderator
Moderator


Joined: 21 Dec 2007
Online Status: Offline
Posts: 4374
Quote lockwelle Replybullet Posted: 14 Jun 2012 at 5:12am
well, I can give a solution, but I don't think that it is foolproof.
 
have a shared variable in the detail section(?) and populate it with the actual item code, then display the shared variable in the footer
 
it's a start...
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