Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Sequence number generation 1

Status
Not open for further replies.

gbjbaric

IS-IT--Management
Sep 12, 2003
2
IE
I need to generate a sequence number at the end of each printed line of my report. This must be a 10 character field, filled out with zeros (0000000001, 0000000002 ...etc)
How do I do it ?
 
Of each printed line, or each record?

Will this be in the report/page header?

If by record, use the recordnumber function, as in:

totext(recordnumber,"0000000000")

If it's every line, you might use formulas in every section that prints a line, and increment a variable, as in:

whileprintingrecords;
numbervar LineNumber := LineNumber+1;
totext(LineNumber,"0000000000")

-k
 
Didn't know about the recordnumber function.
Just tried it and it works perfectly - thanks
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top