Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Report Design
Message Icon Topic: keep group toghether issue Post Reply Post New Topic
Author Message
jorrebor
Newbie
Newbie


Joined: 12 Sep 2011
Location: Netherlands
Online Status: Offline
Posts: 18
Quote jorrebor Replybullet Topic: keep group toghether issue
    Posted: 20 Sep 2011 at 10:10pm
Hi,

my report looks like this:



I want the tables which are bordered by the rounded rectangle to be a group. The group should not be broken a page break. I have tried the following:

  • create a group around the detail section and set this to "keep group together"


this resulted in:



the keep group together command is not adhered....

so i tried setting the details section to "keep together " as well:



Now the object groups are kepped together, but i get an empty box at the bottom of the page....

I tried conditional supressing like:

if IsNull({Query.ToestelId}) = true then true else false;

where toestelID is the grouptitle on which the group should be printed.

my design looks this:   



This bugs me for a while now, and i would loved to have it fixed!

thanks for the help!

Jorrit
IP IP Logged
lockwelle
Moderator
Moderator


Joined: 21 Dec 2007
Online Status: Offline
Posts: 4372
Quote lockwelle Replybullet Posted: 21 Sep 2011 at 3:39am
the 'keep together' that seems to work as desired is in the group.
I right click on the report section and select 'change group'.  On the second tab, there is a check box for 'keep together' and this seems to work as desired.
 
Standard caveats, if there is too much data for 1 page, there will be a page break. 
 
HTH
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 21 Sep 2011 at 4:08am
+1 on lockwelles suggestion.
In the section expert, "keep togther" is only referencing one section (GH,details or GF) of a group, not all parts that make up a group.
In the group set up 'Keep group together' is referencing all sections at once.


Edited by DBlank - 21 Sep 2011 at 4:21am
IP IP Logged
jorrebor
Newbie
Newbie


Joined: 12 Sep 2011
Location: Netherlands
Online Status: Offline
Posts: 18
Quote jorrebor Replybullet Posted: 21 Sep 2011 at 4:31am
thanks for the quick reply!

i already tried both options in several combinations (also details "keep together" off and group "keep together" on).

Nothing of this seems to work..

is there a formula which i can use?

thanks!
IP IP Logged
lockwelle
Moderator
Moderator


Joined: 21 Dec 2007
Online Status: Offline
Posts: 4372
Quote lockwelle Replybullet Posted: 21 Sep 2011 at 8:06am
there really isn't...
 
The best that you can do, outside of the 'keep together' is to count rows and to force page breaks yourself.
 
This can be tricky as CR doesn't report back where it is printing on the page (hence counting) but how much room is used per row and how much is consumed between groups can be a pain to keep track of (though not impossible, but maintanence :( ... )
 
If any items display as multiple rows, well, you never know where CR is going to break the line, so 50 characters may break in instance and not in another due to font size/variable width, and CR not reporting if a row is 1 line tall or 2 (or more)
 
The code is not particularly pretty and the results may not always work as desired (though probably too many pages than not enough).
 
So the short, it can be done, but I would rather use the 'keep together' if at all possible.
IP IP Logged
jorrebor
Newbie
Newbie


Joined: 12 Sep 2011
Location: Netherlands
Online Status: Offline
Posts: 18
Quote jorrebor Replybullet Posted: 21 Sep 2011 at 9:02pm
thats too bad then... we'll have to go as it is.

Thanks!

EDIT: i managed! I still had an outer group which was also set to keep together. Apperently that inluences the keep together command of the inner groups....

That's a known issue or not?

(The outer group contained too much too possibly fit on one page..)

Edited by jorrebor - 21 Sep 2011 at 9:17pm
IP IP Logged
lockwelle
Moderator
Moderator


Joined: 21 Dec 2007
Online Status: Offline
Posts: 4372
Quote lockwelle Replybullet Posted: 22 Sep 2011 at 3:06am
any and all groups that are set to keep together will affect how CR tries to keep the section together, and when you really think about it, it is the outer most group that is the 'main' driver, as CR is trying to keep that group together...the rest are just along for the ride.
 
I would think it is a known issue, but so to speak, one of the report writer's making as they (we) set the flag...CR has it off by default
IP IP Logged
Post Reply Post New Topic
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



This page was generated in 0.031 seconds.