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 Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Widowed Group Header 3

Status
Not open for further replies.

Crystalyzer

Technical User
Mar 28, 2003
218
I have a report that has GH1 for "Fund Name" and GH2 for "Deal Name" and the detail section contains securities invested in as follows:

GH1 Fund Name
GH2 Deal Name
D Preferred A
D Common

The problem I am having is that GH1 sometimes prints on the last line of a page and then GH2 prints on the first line of the new page. In these situations I would like to have GH1 start a new page before but I can't seem to figure out how.

Thanks in advance for any guidance/help.

Lloyd
 
You can use the Keep Group Together setting to keep them from being orphaned:

Report > Group Expert > pick the outermost group field (Fund Name) > click Options > Options tab > check 'Keep Group Together'

-dave
 
Thanks and a star for you vidru for the accurate speedy reply! Works like a charm. The best solutions are the simplest one eh?

Lloyd
 
After implementing vidru's solution:
Report > Group Expert > pick the outermost group field (Fund Name) > click Options > Options tab > check 'Keep Group Together'
I found that I created many more pages due to an increased amount of white space where sections were moved to new pages that didn't fit the current page. Sooooo that solution doesn't work for me as well as I hoped. Is there any other way (i.e. using counters or previous next formulas that anyone has come across?)

Thanks again vidru and thanks in advance for any other ideas!

Lloyd
 
So you don't want orphans, and you don't want to have white space.

Perhaps you could demonstrate how those two opposing theories might be represented?

You might keep a record counter going and use the new page before or after to force a page break at some point, but you'd have to define where the point is where you'd want to break.

Your post suggests that you don't know what you want.

-k
 
-k

I don't think that my original post suggests that I don't know what I want.
The problem I am having is that GH1 sometimes prints on the last line of a page and then GH2 prints on the first line of the new page. In these situations I would like to have GH1 start a new page before but I can't seem to figure out how.

I just initially thought that vidru's solution would suffice, however, after previewing the full report (780 pages post his suggestion) I wasn't as happy with the result and I am trying to re-skin the cat so to speak.

Lloyd
 
Specifically, you can create two formulas:

//{@reset} to be placed in the page header:
whileprintingrecords;
numbervar linecnt := 0;

//{@linecnt}:
whileprintingrecords;
numbervar linecnt := linecnt + 1;

Place this in both group headers and the detail section.

Then go to the section expert and format your Group Header #1->new page before->x+2 with the following formula:

whileprintingrecords;
numbervar linecnt in [56,57];

Then format Group Header #2 with:
whileprintingrecords;
numbervar linecnt = 57;

In both cases, do NOT check the box for new page before--just let the formula do its work when it applies.

You can change the "56,57" to whatever you find is the natural count on the page, i.e., "N, N-1". This assumes that each section is of the same height.

-LB
 
LB,

Thanks! I'll give it a try. It should take care of MOST of the white space.

Lloyd
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top