How To…PageBreak when X Space Left


“How can I force a page break when less than X amount of space left?”


For simple layouts, use the DetailBand.PrintCount property to limit the number of times a static height detail band prints on each page.

For layouts with dynamic height detail, this example shows how to use the DetailBand BeforePrint event to calculate the amount of space left on the page.


Sample Delphi code: