Now that I better understand the terms used to describe this issue I believe I can better explain my issue then in my last post a few weeks back.
Let's assume that I am using a DB that lists every State in the US and every county within each state and within each county every zip code and within each zip code a list of each sub-zip code, that additional 4 number extension recently added by the Postal service. I'm using this data source because it provides me with 3 levels of grouping (State, COunty then ZIp code) and 1 detail level, all the 4 digit zip code extensions and its an easy to understand example that does not violate any NDA (which my company has with the maker of our software & the DB it uses.)
In this example I would have something like this:
H1 - ALASKA
H2 - Aleutians East Borough
H3 - 99612
0001
0002
F3 - Total 99612 = 2
H3 - 99661
0001
0002
0003
0004
F3 - Total for 99661 = 4
H2 - ABC County
H3 - 12345
0001
F3 - Total 12345 = 1
F2 - Total for Aleutians East Borough = 7
F1 - Total for Alaska = 7
Fore the sake of brevity I have listed a very limited set of data of which some I made up for time constraints.
In this example, when run for all states and countries and zip codes you will have a very large report with many groupings. WHat happens for me is that no matter how I configure the various options I can't prevent at least 1 of the following from happening
1) An instance of F3 or F2 or F1 printing at the top of a page
2) An instance of H1 or H2 or H3 printing at the bottom of a page
When I look at this issue as a rpeorting issue in general it seems that there's no way to dynamically determine where to place a page break based on combinations of rows of DETQAIL and combinations of Headres & Footers. To avoid #1 & #2 above we have been manually adding page breaks where needed which works until one or more rows in the DETAIL section changes so that the page breaks we had are shifted. Imagine in this example if 1 county increased the number of xip codes while another (perhaps in a different state) lost the same number of more or less. This is the kiind of change we run into that prohobots manual page breaks.
If Crystal Reports had some way of specifying what NOT to do like a "NO ORPHAN FOOTERS" option at the group level then I think I'd be god to go but atlas there is no such option.
The closest solution I;ve seen is one that requires obtaining in advance how many detail rows will fiti on a page and how many detail rows each heading & footer takes and keep a running total (reset at the start of each page) and when a section priints you calculate if the number of rows in that section plus it's header & Footer will push it past the remaining sapce on the page and if it does then enter a page break. However I'm not sure thats even a realistic solution considering how much time and conmplexity it would take to implement something like that not to mention the changes required should the height change for any section which can happen when cosmetic changes occur.
Ideas?