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

PrintOnFirstPage in combination with ResetPageNo

edited August 2004 in General
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

Comments

This discussion has been closed.