I've played around with this a little and I think I've found a solution that might work for you. My example assumes only 1 group (Home_Dept) and 60 lines of print between the page header and page footer. It prints employee numbers (Emp_No) in the detail section.
You must determine how many lines can print on a page between the page header and the page footer. All group header and footer sections that will be printed must be the same size as the detail section or an exact multiple of the detail section (ie. exactly twice as large or three time etc.) because you will need to manually count how many lines have printed.
Add two subsections to the group header giving you sections GH1a, GH1b, GH1c. Move the information you want to print for each group header into section GH1b. Suppress GH1c. Draw a line at the top of GH1a the width of the column and shrink GH1a as small as possible. GH1a will be the only section that is smaller than the detail section.
Create the following formulas:
// formula: @LineCnt - place in detail section.
WhilePrintingRecords;
NumberVar LineCnt;
If LineCnt < 60 then LineCnt:= LineCnt + 1 else
LineCnt:= 1
// formula: @LineCntColumnHd - place in GH1c (suppressed section).
WhilePrintingRecords;
NumberVar LineCnt;
If LineCnt + Count({ESYEMPLR.EMP_NO},{ESYEMPLR.HOME_DEPT}) >= 60 then
LineCnt:= 1 else
LineCnt:= LineCnt + 1;
LineCnt
// formula LineCntGrpFooter1 - place in group 1 footer.
WhilePrintingRecords;
NumberVar LineCnt;
If LineCnt <= 60 then LineCnt:= LineCnt + 1 else
LineCnt:= 0
// formula LineCntReset - place in page footer.
WhilePrintingRecords;
NumberVar LineCnt:= 0
Open the section expert and select GH1a. Conditionally "print at bottom of page" with following code:
WhilePrintingRecords;
NumberVar LineCnt;
LineCnt + Count({ESYEMPLR.EMP_NO},{ESYEMPLR.HOME_DEPT}) >= 60 and LineCnt > 0
Conditionally suppress group 1 footer with following code:
WhilePrintingRecords;
NumberVar LineCnt;
LineCnt > 60 or LineCnt = 1
If any of the printable section are greater than one line is size you must adjust the above formulas to properly count the number of lines printed.
I believe this will do what you need.
MrBill