Home General
New Blog Posts: Merging Reports - Part 1 and Part 2

how to calculate a variable?

edited October 2011 in General
Hello,

I have a report with groups, every group is being printed on its own page.

There is a variable on the header of such a page, to display Invoice Number.

There is some start value for invoice number, and i calculate the value to
print like that:

procedure TdmHB.labInvoiceNumberGetText(Sender: TObject; var Text: string);
begin
inherited;
Text := IntToStr(FCurrentInvoiceNumber + TheReport.CurrentPage - 1)
end;

But its always 1.

Any ideas?

Thank you,
Eugene.

Comments

  • edited October 2011
    Eugene V. Goldberg wrote:


    I think you should use TheReport.AbsolutePageNo instead of
    TheReport.CurrentPage

    hth

    Arno
  • edited October 2011
    Thank you Arno, it worked.

This discussion has been closed.