Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Widowed Group Headers redux

Status
Not open for further replies.

aaronburro

Programmer
Jan 2, 2003
158
US
I've got a minor situation that I'd like to resolve that works like this:

I've got three groups in my report. The first is a warehouse group, the second is a customer group, and the third is an Invoice group. All groups should do their damnedest to stay on one page.

The third group should have no trouble being on one page. The second group is more likely to have trouble, since there could be several invoices. THe first group will probably never stay all on one page.

Whats basically happening is that I have no widowed headers for the 2nd and 3rd group, but I often have them for the 1st group.

All groups are set to "Keep together" and to "repeat group headers on new page."

There is a slight complication, in that the 1st group header is not always shown. It gets hidden if the user choses not to show customers, in which case I just show group 1 footers and the report footer. I've already addressed that part of the "problem," so thats not a real concern.

I tried the "solution" in the CR Knowledgebase. Needless to say, it didn't work. I suppose it didn't work because I am using multiple groups, but still. I tried putting the counter incrementer in the Group2 header, but that didn't work either... To complicate things, this report is a subreport, so there is no true page header either...

I did see the previous thread about widowed group headers, but it didn't seem to help all that much either...
 
You mentioned having set "Keep together", but you didn't specifically say that you used "Keep group together", which is different. Go to report->change group expert->options and check to see whether you have "keep group together" set on all groups.

I'm guessing that's what you meant. I'm having a little trouble imagining what your current report looks like and how you would like it to look. Can you please state what you would like to happen? Usually it is group footers that are likely to be widowed rather than group headers.

I wonder whether the keep group together option is actually working against you. You might want to experiment with removing that on one or more of your groups.

-LB
 
sorry, i might have neglected to mention that it was in the group expert where I have "keep together" checked. I'm sure its checked in the format expert too, but that shouldn't matter. I've tried not keeping the second group together, and that kills the widowed group 1 header, but leaves me w/ the undesired effect of split group 2's. If I had to choose, I'd choose the widowed group 1 header over split group 2s, as I can just throw the widowed page away...
 
You could insert a second GH#2 and drag it so that it becomes GH#2_a, with your group #2 name in GH#2_b. Then place your group #1 header in GH#2_a and suppress GH#1. Then go to the section expert->GH#2_a->suppress and add:

if not in repeatedgroupheader then
{table.group#1field} = previous({table.group#1field})

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top