i have problem with line#

edited 6:26AM in FastReport 4.0
Hi.
see this code:
var myline:integer;

procedure PageHeader1OnBeforePrint(Sender: TfrxComponent);
begin
  myline:= 0;
end;

procedure Memo12OnBeforePrint(Sender: TfrxComponent);
begin
  inc(myline);
  Memo12.text:=inttostr(myline);
end;

but when report is run:
show number like this:

page1:
1
2
3
page2:
4
1
2
3
page3:
4
1
2
3
...

please help me
i want to show this page like:
page1:
1
2
3
...
page2
1
2
3
...
page3:
1
2
3
...

Comments

  • gordkgordk St.Catherines On. Canada.
    edited 6:26AM
    you are not having a problem with the fr variable line#
    you have a problem with where you reset your own variable to 0
    use the correct event of the page header. it should be in OAP
  • edited 6:26AM
    thank you dear gordk!
    but how to solve this problem
    please help me.
  • gordkgordk St.Catherines On. Canada.
    edited 6:26AM
    procedure PageHeader1OnAfterPrint(Sender: TfrxComponent);
    begin
    myline:= 0;
    end;

    btw memo12 does not need to use code to get a value all it needs to contain is [myline]
  • edited April 2009
    but how to print numbers?
    memo12.text print myline value in report.
    var myline:integer;
    procedure MasterData1OnBeforePrint(Sender: TfrxComponent);
    begin
      inc(myline);
      Memo12.text :=inttostr(myline);              
    end;
    procedure PageHeader1OnAfterPrint(Sender: TfrxComponent);
    begin
      myline := 0;  
    end;
    

    dear qordk:
    i use your code but dont solve my problem.
  • edited 6:26AM
    any can help me?

Leave a Comment