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

Comments

  • gordkgordk St.Catherines On. Canada.
    edited 5:49AM
    try setting the reports reset pagenumbers property, if that doesn't work for you use your own variables for page numbers and totals.
  • edited 5:49AM
    gordk wrote: »
    try setting the reports reset pagenumbers property, if that doesn't work for you use your own variables for page numbers and totals.

    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.

Leave a Comment

Rich Text Editor. To edit a paragraph's style, hit tab to get to the paragraph menu. From there you will be able to pick one style. Nothing defaults to paragraph. An inline formatting menu will show up when you select text. Hit tab to get into that menu. Some elements, such as rich link embeds, images, loading indicators, and error messages may get inserted into the editor. You may navigate to these using the arrow keys inside of the editor and delete them with the delete or backspace key.