MultiPage Report Page NO Problem
I have designed a multi-page report, which has three pages and each page has its different format. I want assign each page has individual page no.
For example:
Multi-page report page1-->Page 1 of 3
Multi-page report page2-->Page 1 of 3
Multi-page report page3-->Page 1 of 3
I have tried to use [Page#] of [TotalPages#] or [Page] of [TotalPages], I got the same result.
Page 1 of 9 ..... Page 9 of 9
For example:
Multi-page report page1-->Page 1 of 3
Multi-page report page2-->Page 1 of 3
Multi-page report page3-->Page 1 of 3
I have tried to use [Page#] of [TotalPages#] or [Page] of [TotalPages], I got the same result.
Page 1 of 9 ..... Page 9 of 9
Comments
I use the following code to solve my problem:
Report-->Option-->Check Double Pass
Report-->Variable--> <TP> = <TotalPages#>/3
Multi-Page Report1-->Page :[P1] of [TP]
Multi-Page Report2-->Page :[P2] of [TP]
Multi-Page Report3-->Page :[P3] of [TP]
[Code Page:]
var P1,P2,P3:Integer;
procedure Page1OnBeforePrint(Sender: TfrxComponent);
begin
P1:=1;
end;
procedure Page2OnBeforePrint(Sender: TfrxComponent);
begin
P2:=1;
end;
procedure Page3OnBeforePrint(Sender: TfrxComponent);
begin
P3:=1;
end;
procedure PageFooter1OnBeforePrint(Sender: TfrxComponent);
begin
P1:=P1+1
end;
procedure PageFooter2OnBeforePrint(Sender: TfrxComponent);
begin
P2:=P2+1
end;
procedure PageFooter3OnBeforePrint(Sender: TfrxComponent);
begin
P3:=P3+1
end;
begin
end.