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

Detecting last page in a report

edited September 2005 in General
Hi we are using Delphi 7 and reportbuilder 9.02, and we have a
invoice/deliverynote/credit form, i have placed a couple of Regions in the
page footers for each report type, these are enabled/disabled depending on
the report required at the onStartFirstPass event....works fine, but id like
to only show them on the last page, how do i do this ? can i use Page count
(i dont have any groups) and say somewhere if pageno = pagecount then show
region ?

Thanks

Colin

Comments

  • edited September 2005
    Set Report.PassSettings=psTwoPass.

    In the BeforePrint of the FooterBand insert something like this:

    procedure TForm1.ppFooterBand1BeforePrint(Sender: TObject);
    begin
    ppFooterBand1.Visible := ppReport1.PageNo = ppReport1.PageCount;
    end;

    Mauro.

  • edited September 2005
    works great thanks


This discussion has been closed.