how to calculate a variable?
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.
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.
This discussion has been closed.
Comments
I think you should use TheReport.AbsolutePageNo instead of
TheReport.CurrentPage
hth
Arno