PrintOnFirstPage in combination with ResetPageNo
Hello
I have a report with a group with NewPage=true and ResetPageNo=true.
Then there is a HeaderBand which shouldn´t be printed on the pages with
pagenumber 1.
There could be more Pagenumber 1 on the report because of the
ResetPageNo=true.
I have tried to set the PrintOnFirstPage property of the HeaderBand to
false but then the Headerband disappears only on the first page of the
report.
My solution now is the following
procedure TForm1.ppHeaderBand1BeforePrint(Sender: TObject);
begin
ppHeaderBand1.Visible:=(ppReport1.PageNo<>1);
end;
procedure TForm1.ppHeaderBand1AfterPrint(Sender: TObject);
begin
ppHeaderBand1.Visible:=true; //without this line the BeforePrint event
never fires after the visible property is set to false the first time
end;
Is this solution correct or is there another way to accomplish this
behaviour?
regards
Oliver Wurdak
I have a report with a group with NewPage=true and ResetPageNo=true.
Then there is a HeaderBand which shouldn´t be printed on the pages with
pagenumber 1.
There could be more Pagenumber 1 on the report because of the
ResetPageNo=true.
I have tried to set the PrintOnFirstPage property of the HeaderBand to
false but then the Headerband disappears only on the first page of the
report.
My solution now is the following
procedure TForm1.ppHeaderBand1BeforePrint(Sender: TObject);
begin
ppHeaderBand1.Visible:=(ppReport1.PageNo<>1);
end;
procedure TForm1.ppHeaderBand1AfterPrint(Sender: TObject);
begin
ppHeaderBand1.Visible:=true; //without this line the BeforePrint event
never fires after the visible property is set to false the first time
end;
Is this solution correct or is there another way to accomplish this
behaviour?
regards
Oliver Wurdak
This discussion has been closed.
Comments
Yes, this is how I would have done it . Unfortunately the
PrintOnFirstPage only applies to the Report's absolute pages.
--
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com