Ok...here we go...this is not an exact science but stay with me and we shall see what we can do...the more complicated the report the more difficult it is to do.
FIRST
While printer fonts do vary they are close enough for this purpose.
From a printed page from the crystal report try to measure the height of each section printed...You can use grid snaps if you want but I like measuring in millimeter (I draw a temporary line top and bottom of each section for this measurement)
We shall use a simple example to illustrate the approach.
1. We shall assume no report header printed
2. we shall assume no sections suppressed
3. our report will consist of
- page header (30 mm )
- Group header (20 mm )
- details (10 mm)
- Group footer (15 mm)
- page footer (15mm) (you can forget about this except
for subtracting this from the
page bottom )
4. We shall assume that the Group header will not repeat on a new page (actually I usually like the hearder or a portion of it repeating so that the user doesn't have to flip back and forth to see what the data belongs to what group...but this will simplify it a bit)
5. We are going to use standard 8.5"x11" paper in portrait mode (this is 279 mm less 15mm for the page header is
279 - 15 = 264mm)
6. we shall assume that one or more complete groups can be printed on a single page.
7. Now we are going to create some addition formulas
@initialization
WhilePrintingRecords;
numbervar totalCount := 0;
***************************************************
@AddPageHeader (placed suppressed in the Page header)
WhilePrintingRecords;
numbervar totalCount ;
totalCount := totalCount + 30;
***************************************************
@AddGroupHeader (placed suppressed in the group header)
WhilePrintingRecords;
numbervar totalCount ;
totalCount := totalCount + 20;
***************************************************
@AddDetailLine (placed suppressed in the Detail Section)
WhilePrintingRecords;
numbervar totalCount ;
totalCount := totalCount + 10;
***************************************************
@AddGroupFooter (placed suppressed in the Group Footer)
WhilePrintingRecords;
numbervar totalCount ;
totalCount := totalCount + 15;
8. Now we create a total reset formula that is placed suppressed in the page footer
@ResetTotalCount
WhilePrintingRecords;
numbervar totalCount := 0 ;
9. NOW we are going to create a Totalcount display formula to see what is going on with the sums. this is just a diagnostic formula...since it is temporary and very small I highlight it with a yellow background so they are easy to find later
@Test_TotalCountDisplay
WhilePrintingRecords;
numbervar totalCount ;
totalCount ;
NOW SPRINKLE THIS FORMULA ON EACH LINE,HEADER AND FOOTER of the report and run the report as it is...just to see what is happening to the totals
MAKE SURE that you the numbers that you see look reasonable (for instance: the total as it approaches the bottom of the page before the page footer should be close to 264 by our example here)...also make sure the totals are resetting on a new page
10. NOW TRY TO SEE PATTERNS THAT YOU WANT TO SPLIT PAGES ON
for example
A) if a new Group header is going to occur and the count
is 264 - 30 = 234 (20 for the header + 10 for
one detail section = 30) then you can decide that you
would like this Group header to start on a new page.
Place this section in the Group section conditional formula for "New Page Before"
WhilePrintingRecords;
numbervar totalCount ;
totalCount >= 234;
B) if a detail section is going to be printed and the count
is 264 - 10 = 255 then you can decide to split to
a new page here with a similar formula in the detail
section.
WhilePrintingRecords; (in conditional "New Page before"

numbervar totalCount ;
totalCount >= 255;
c) If the Group Footer is printed and the total is greater
than 264 - 30 = 234 (20 for the header + 10 for
one detail section = 30) then you can decide that you
would like this split to a new page AFTER printing so
you don't have an orphan header.
WhilePrintingRecords; (in conditional "New Page before"

numbervar totalCount ;
totalCount >= 234;
11. NOW YOU RUN THE REPORT AGAIN and see if things split as you hope they will.....
NOW comes the tinkering part...you play with these numbers the size allotted to each section and try to get the best possible result...Sometimes the math doesn't seem right when it is done (conditional suppressed sections require special attention) but as long as you can get a reasonalbly consistant splitting total at the bottom of each page you should be all right.
Good Luck
BTW when things are perfect...remember to remove those yellow display fields

Jim Broadbent