Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2020 : Report Design
Message Icon Topic: Keep subreport together with detail Post Reply Post New Topic
Author Message
brain
Newbie
Newbie


Joined: 13 Apr 2010
Online Status: Offline
Posts: 36
Quote brain Replybullet Topic: Keep subreport together with detail
    Posted: 14 Apr 2015 at 5:53am
I have a detail section with a subreport. "Keep Object Together" for the subreport keeps it together as an entity; however, I also have "Keep Together" checked for the detail section. But the subreport goes to a new page when the data in the detail section, above the subreport, extends to the bottom of a page.

I have tried adding detail b and putting the subreport there instead of inside detail a, but with no change of behavior. I have tried every combination of enabling/disabling "Keep Together".

How do I force the detail to go to a new page when necessary so that the subreport inside the detail will stay together with the detail?
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 14 Apr 2015 at 9:03am
I have found the keep detail togther does not do much when you have items with in it that can grow. The detail section seems to "keep together" as much as the original height of that section in the design.
SOme of this depends on if you have any items set to 'can grow'.
A few thoughts-
1 -You might consider creating another group level that allows the grouping for each detail record then set that goup to keep together in the group expert. 
2 -You also might consider expanding the top of the sub report a bit to overlap the items you want to 'keep together'.
3 - push the fields into the sub report using shared variables
4 - consider using the overlay function
if none of these work please explain how you have items set up including the 'can grow' settings.
IP IP Logged
brain
Newbie
Newbie


Joined: 13 Apr 2010
Online Status: Offline
Posts: 36
Quote brain Replybullet Posted: 14 Apr 2015 at 10:19am
The overlap worked perfectly. I just added a text label inside my detail section, suppressed it, then dropped it down a bit so it overlapped the subreport--and now the subreport stays together with the detail.

The issue was, indeed, that the subreport needs to be able to grow, since it can have one or more records in it.

Thank you!
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.016 seconds.