Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Technical Questions
Message Icon Topic: widowed group header in multi-group rpt Post Reply Post New Topic
Author Message
valerieb
Newbie
Newbie


Joined: 06 Feb 2009
Location: United States
Online Status: Offline
Posts: 8
Quote valerieb Replybullet Topic: widowed group header in multi-group rpt
    Posted: 13 Mar 2009 at 8:44am
Hi Everyone,
Thanks in advance for any help you provide regarding my problem!
I have read about the orphan/widow workarounds that involve putting all detail items into a sub-header section.  Unfortunately, that work around will not work for me.  My details section has 5 parts.
My report has 4 levels of grouping.  At the second level up, I am getting an orphan header on a blank page.  It only happens when the sub-group that it plans to print next is too large to fit on a page, so it does a page break and then decides to go ahead and print on the second and third pages.
Is there anyway to obtain the indicator that the next section will not fit on the page?  Can this logic be overridden to be "if the section is larger than a page, go ahead and start"?
 
I currently have
group a (has group option of repeat header on each page)
   group b
       group c (has group option of repeat header on each page)
           group d (has group option of repeat header on each
                        page and keep group together)
 
I have no "keep together" options checked in the sections expert.
I do have the "New Page After" option checked for the group c footer.
 
Please help!!!!!
 
Thank you
 
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 13 Mar 2009 at 9:10am
When you say second level up do you mean GroupHeader C falls on a page and then GroupHeaderD gets pushed to the next page if there are a certain number of records in your details?
Also do you have 5 detail sections like DetailA, DetailB, DetailsC or do you mean something other than that when you say "My details section has 5 parts"?
 
My initial guess here is the "Keep together" as checked on GroupD is causing it.
You may try to use a formula to conditionally activate that. If you know how many details are needed to occur to force the next page problem try using a record count to make this keep together occur only when the record count is < that #. Something like...
Count(field,groupD)<number that fits on one page
IP IP Logged
valerieb
Newbie
Newbie


Joined: 06 Feb 2009
Location: United States
Online Status: Offline
Posts: 8
Quote valerieb Replybullet Posted: 13 Mar 2009 at 9:34am
Thank you for your reply!
 
I did not know about the count function (new to crystal)  - this looks like it could handle my issue.  Do you know how to conditionally activate the group level "keep together"?  There is no option to add a formula there.  
Thanks again!
 
FYI,
I just tried removing the keep group together from the group option and checking the keep together in the section expert (where i know i can add the formula), but now group d doesn't keep together right Confused.
(I checked the keep together for all sections inside group d, and lesser variations.)
 
BTW, yes you had the right visual on my problem:
Normally i get
page header
(group a does not have a header)
group b header
group c header
group d header
details
with page breaks generally keeping the group "d" together.

The problem is when the group d will span more than 1 page I get:
page header
(group a does not have a header)
group b header
(Blank page is here with just the 2 headers)
<page break>
page header
group b header
group c header
group d header
details
 
 
Also, yes the details are details a, b, c, d, e
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 13 Mar 2009 at 10:28am
These get tricky. I do not think you can conditionally keep together at using the Group Expert. I was suggesting it in the Section Expert. I am not exactly sure how those operate in tandem or which is dominant...
 
I would go through your section Expert and make sure you do not have other levels with Keep Together indicated as True in there, not just in the Group Expert. There are a couple of other things that may be impacting this, one is the suppress blank sections option as for each level and the other is your page break on groupfooterC.
 
Your description is throwing me off a bit as I am not sure why you are getting the break at groupHB and why you are creating a breaking on footerC?
 
If you are not using Drill down functionality you may consider just hiding Headers A, B and C and mimicking them in a Groupheader D1 by dropping these fields that they it is grouped on in that section, then moving your new page after group footerD.
IP IP Logged
valerieb
Newbie
Newbie


Joined: 06 Feb 2009
Location: United States
Online Status: Offline
Posts: 8
Quote valerieb Replybullet Posted: 13 Mar 2009 at 11:54am

Thanks again for the reply.

Opps - sorry, i did describe the problem wrong!

It actually is that when group d will span more than 1 page I get:

page header
(group a does not have a header)
(group b header is not repeated on each page, and this is the case in this instance)
group c header
(Blank page is here with just the 2 headers)
<page break>
page header
group c header
group d header
details


I will look more at the section expert but from what i have read, the group level keep together seems to be the way to go if at all possible.

Your idea of using only one group header is intriguing - had not thought of this.  In this case, I presume that the group d header would have multiple sections so that I can conditionally display the various sections.
If this by itself doesn't fix up the issue, i could implement the documented work-around where you put the detail elements into a section of the header.  I had thought i couldn't try the work-around do due to the complexity of the report.

Thanks for the ideas! I will let you know if it is a success!

IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 13 Mar 2009 at 12:05pm
based on your new description Just try moving your "new page after" from GFc to GFd
 
You may also wnat ot do this conditionally for as
not onlastrecord
to avoid an extra page at the end of the report.


Edited by DBlank - 13 Mar 2009 at 12:07pm
IP IP Logged
valerieb
Newbie
Newbie


Joined: 06 Feb 2009
Location: United States
Online Status: Offline
Posts: 8
Quote valerieb Replybullet Posted: 13 Mar 2009 at 12:30pm
It works! Without having to move the details!
What a great way to end the week! 
Thank you so much for the idea - could have been banging my head against the wall for many more days!
IP IP Logged
valerieb
Newbie
Newbie


Joined: 06 Feb 2009
Location: United States
Online Status: Offline
Posts: 8
Quote valerieb Replybullet Posted: 13 Mar 2009 at 12:33pm

Just saw your last posting - this case works but i don't want to always page after d.  Sometimes, 2 or 3 d's may fit on a page.

For clarification, the headers all in one header (conditionally displaying sub-sections) is what did work for me.
 
Thanks again ;-)
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.