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

Print On Last Page Only

edited November 2008 in General
Hi All,

I have a report w/ a subreport in it. I have a footer with date/time, page
number, etc. I also have a region in the footer which I want to print only
on the last page. I do not want to use a summary for this because it is an
invoice type report using a page style for the layout.

Is there any way to know that I am on the last page and only show the region
there?

Thanks

Comments

  • edited November 2008
    Hi Stacey,

    If you use a two pass report you can compare the Report.AbsolutePageNo and
    Report.AbsolutePageCount to determine if you are on the last page.
    Something like the following...

    Inside the FooterBand.BeforePrint event... (Be sure the Report.PassSetting
    propety is set to psTwoPass.)

    begin
    if Report.SecondPass then
    if Report.AbsolutePageNo = Report.AbsolutePageCount then
    Region.Visible := True
    else
    Region.Visible := False;

    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.