Footers
When printing a page with a Footer set with the attributes PrintOnFirstPage
(off) and PrintOnLastPage (on) this works as expected with a 2-page report,
but if the report is only 1 page long, no footer is printed. A classic
example of this is an invoice where the total is to be printed on the final
page only. If the invoice fits on 1 page, then no total is printed!
Any solutions other than printing the footer on every page?
Peter Grimshaw
(off) and PrintOnLastPage (on) this works as expected with a 2-page report,
but if the report is only 1 page long, no footer is printed. A classic
example of this is an invoice where the total is to be printed on the final
page only. If the invoice fits on 1 page, then no total is printed!
Any solutions other than printing the footer on every page?
Peter Grimshaw
This discussion has been closed.
Comments
print at the very end of the report. Set the summary band's PrintPosition to
align it with the bottom of the page. To get the report footer to not print
on the first page in a one page report follow the guidelines below:
-------------------------------------------------------
Tech Tip: Using PrintOnFirstPage for One Page Reports
-------------------------------------------------------
Question:
--------
I have a Footer that I do not want to print on the first
page of my report, unless the report is only one page.
Solution:
--------
Both the Headerband and FooterBand have boolean properties
called PrintOnFirstPage and PrintOnLastPage that can be used
to control whether the respective bands print.
Example:
1. Set default behavior prior to calling Report.Print
ppFooterband1.PrintOnFirstPage := False;
ppReport1.Print;
2. Add the following code the Report.OnEndFirstPass event:
procedure TForm1.ppReport1EndFirstPass(Sender: TObject);
begin
{override default behavior for a single page report}
if ppReport1.AbsolutePageCount = 1 then
ppFooterband1.PrintOnFirstPage := True;
end;
--
Cheers,
Alexander Kramnik
Digital Metaphors
http://www.digital-metaphors.com
info@digital-metaphors.com