Page Break
Hi All
I have built a report with about 10 headers / master data pairs on it. During print is usually occupies 3 - 5 pages. My users have complained some times where only the header shows up on one page, and the rest on the next page. Obviously, this is the nature of a "single page" report being printed on multiple pages. Depending on the amount of data to print, most of the times, the users are happy. In some cases I would like to start a new page only if the header only is printet on the last page, and possibly if only a few rows can be printed. How can I check how many lines will be printed for a header / master data pair? I mean, lets say if only the header and two lines can be printed on a page, I would like to break the whole header and master data over to the next page.
Thanks for any information. Using FR6 and Delphi 10.2
Eivind
I have built a report with about 10 headers / master data pairs on it. During print is usually occupies 3 - 5 pages. My users have complained some times where only the header shows up on one page, and the rest on the next page. Obviously, this is the nature of a "single page" report being printed on multiple pages. Depending on the amount of data to print, most of the times, the users are happy. In some cases I would like to start a new page only if the header only is printet on the last page, and possibly if only a few rows can be printed. How can I check how many lines will be printed for a header / master data pair? I mean, lets say if only the header and two lines can be printed on a page, I would like to break the whole header and master data over to the next page.
Thanks for any information. Using FR6 and Delphi 10.2
Eivind
Comments
Have you tried checking the FreeSpace against the Height(s) of any Band(s) you need to print, in the BeforePrint event(s) for the Band(s)?
Below is an extract from one of our reports that forces a new page if there is insufficient space to print a sub-heading and detail band.
Please note our reports are all "two pass" type.
Cheers, Paul
NB: Simplified to highlight the key steps.
NB: You need to instantiate the variables referring to the Bands in your Report's BeginDoc Event (the string constants used have to exactly match the spelling in the Report definition):
And the variables themselves have to be manually created in the Private declarations of the Form containing your Report: --- Ends ---
They appeared to solve my page break issues
Cheers
Eivind