Home General
New Blog Posts: Merging Reports - Part 1 and Part 2

Determining Last Line On A Page

edited March 2005 in General
I have a report that contains a group footer that I would like to
suppress when the footer will be the last thing to print on a page.

Can someone pls tell me how to do this.

Thanks

Craig

Comments

  • edited March 2005
    Hi Craig,

    You can check the vertical position just under the last detail band printed
    using the TppReport.Engine.PrintPosRect.Top property. The best place to
    check this value would be the DetailBand.AfterPrint event. Using this
    value, and knowing the height of the group footer, you could determine when
    you would want to make the groupfooter invisible. Something like the
    following....

    uses
    ppUtils,
    ppTypes,
    ppPrintr;

    procedure TForm1.ppDetailBand1AfterPrint(Sender: TObject);
    var
    ldDetailPos: Double;
    begin

    ldDetailPos :=
    ppUtils.ppFromMMThousandths(ppReport1.Engine.PrintPosRect.Top, utInches,
    pprtVertical, ppPrinter);

    if ldDetailPos > 9.5 then
    ppGroupFooterBand1.Visible := False
    else
    ppGroupFooterBand1.Visible := True;
    end;

    --
    Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com

    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
This discussion has been closed.