need to capture in Delphi last page of a report that I created.

need to pass a variable into the delphi which the number of the last page of a report that I created. How can I capture this value?
help please ??

Comments

  • gordkgordk St.Catherines On. Canada.
    edited 5:54AM
    create a variable in the reports variable list set it to 0
    assuming you are using total pages in a memo in the report,
    in that memos oap event write code
    set('mypages',(<TotalPages>));

    in delphi write code for the report components enddoc event
    procedure TForm1.frxReport1EndDoc(Sender: TObject);
    var
    tpage:integer; // or make a global variable
    begin

    tpage := frxreport1.variables;
    showmessage(inttostr(tpage)); // use example
    end;
  • edited 5:54AM
    gordk wrote: »
    create a variable in the reports variable list set it to 0
    assuming you are using total pages in a memo in the report,
    in that memos oap event write code
    set('mypages',(<TotalPages>));

    in delphi write code for the report components enddoc event
    procedure TForm1.frxReport1EndDoc(Sender: TObject);
    var
    tpage:integer; // or make a global variable
    begin

    tpage := frxreport1.variables;
    showmessage(inttostr(tpage)); // use example
    end;

    in the memo put two codes
    set ('page', (<TotalPages>));
    and then
    <page>: = 1;

    when I run the impression that comes within the enddoc method of report it is recognizing the variable to null.
    Attached'm spending the pictures with my font is;
  • gordkgordk St.Catherines On. Canada.
    edited November 2014
    put the code in the onafterprint event of the memo using the totalpages variable
    put the delphi code in the onenddoc event of the tfrx report component'
    works for me.

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.