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

Write "copy" on the second print

Hi

I have a report with 4 sub reports and a line break

When I print this report I want to print two copies, and on the second set add a Watermark saying "copy"

I've placed a label on my report which I'm trying to show or hide.

The following is part of a POC project (hence the bad naming)

var
AbsolutePageCount : Integer = 0;

procedure TForm2.Button1Click(Sender: TObject);
begin
AbsolutePageCount := 0;
ppReport1.Print;
end;

procedure TForm2.ppReport1StartPage(Sender: TObject);
begin
inc(AbsolutePageCount);
WaterMark.Visible := AbsolutePageCount > 2;
end;

If I stop the program on my Inc line It works fine, I get my Watermark on page 3 and 4, but when running the program without breakpoint I only get my Watermark om page 4

Comments

Sign In or Register to comment.