Header (print on first page !!!)
Hi,
I have set the property PrintOnFirstPage on true and the PrintOnLastpage on
false of my Headerband.
When i have a report with only 1 page i get NO header.
(this is because the page is the first page and also the last page so i get
no header)
When i have a report with more pages i get my header on the first page. ->
This works fine !
I need to have a header that prints always on the first page !!!! Also by 1
page !!
Greeetz Hans
I have set the property PrintOnFirstPage on true and the PrintOnLastpage on
false of my Headerband.
When i have a report with only 1 page i get NO header.
(this is because the page is the first page and also the last page so i get
no header)
When i have a report with more pages i get my header on the first page. ->
This works fine !
I need to have a header that prints always on the first page !!!! Also by 1
page !!
Greeetz Hans
This discussion has been closed.
Comments
The example code below shows how you can check if your report is only one
page and adjust the band print setting accordingly.
1. Set the default behavior prior to calling Report.Print...
ppHeaderband1.PrintOnFirstPage := True;
ppHeaderband1.PrintOnLastPage := False;
ppReport1.Print;
2. Add the following code in the Report.OnEndFirstPass event...
procedure TForm1.ppReport1EndFirstPass(Sender: TObject);
begin
{override default behavior for a single page report}
if ppReport1.AbsolutePageCount = 1 then
ppHeaderband1.PrintOnLastPage := True;
end;
--
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com