Question
“Once my columns have finished printing on a page, how can I fill the remaining space to the bottom of the page?”
Solution
Use a group footer band to fill the space. Inside the GroopFooterBand.BeforePrint event, check the remaining space on the page and resize the band to match that size.
Download: FillSpaceAfterLastColumn.zip
Sample Delphi code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 |
uses ppTypes, ppUtils; procedure TForm1.ppGroupFooterBand1BeforePrint(Sender: TObject); begin ResizeGroupFooter; end; procedure TForm1.ResizeGroupFooter; var liMMHeight: Longint; begin //Get the remaining space in mmthousandths (microns). liMMHeight := ppReport1.PrinterSetup.PageDef.mmHeight - ppDetailBand1.SpaceUsed - ppReport1.PrinterSetup.PageDef.mmMarginBottom; //Resize the group footer band. ppGroupFooterBand1.Height := ppFromMMThousandths(liMMHeight, utInches, pprtVertical, nil); //Resize objects inside the group footer. ppShape1.Height := ppFromMMThousandths(liMMHeight, utInches, pprtVertical, nil); end; |