Reset page numbers doesn't work

I am using FR 4.3 and can't get the ResetPageNumbers property on a group header to work. I set that property and StartNewPage to true, but the page numbers (which are printed in the page footer) don't reset when the group changes. Is there a bug with this or am I missing something?

Glenn

Comments

  • edited 11:02PM
    I solved the problem myself so here's the solution in case anyone is interested. I created a variable called PageNum. In the GroupHeader1OnBeforePrint event I set it to 0:
    set('PageNum', 0);
    Then in the PageFooter1OnBeforePrint event I increment it:
    set('PageNum', get('PageNum') + 1);

    This works fine but I still wonder why ResetPageNumbers doesn't work.

    Glenn
  • edited 11:02PM
    galcott wrote: »
    I solved the problem myself so here's the solution in case anyone is interested. I created a variable called PageNum. In the GroupHeader1OnBeforePrint event I set it to 0:
    set('PageNum', 0);
    Then in the PageFooter1OnBeforePrint event I increment it:
    set('PageNum', get('PageNum') + 1);

    This works fine but I still wonder why ResetPageNumbers doesn't work.

    Glenn
    You may need either to check your system or debug the problem.
  • gordkgordk St.Catherines On. Canada.
    edited 11:02PM
    using fr4.4.45, the latest build
    Page [Page] of [TotalPages] in page footer
    works fine
  • edited 11:02PM
    I am running into a similar problem. By my problem is the totalpages is counting visable = false pages. How would I make that work?
  • edited June 2010
    This works for me.

    procedure GroupHeader1OnBeforePrint(Sender: TfrxComponent);
    begin
    Memo1.text := 'Page '+'[page]'+'/'+'[totalpages]' ;
    end;

    Enable the double pass in report's settings (the "Report|Options..." menu item.

    With double pass disable, totalpages print 0 (zero).

Leave a Comment