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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Easy way to number output lines on a report

Status
Not open for further replies.

dean12

MIS
Oct 23, 2001
273
US
I'm looking for the "best" or perhaps "easiest" way to number the output lines on my report.

Sometimes I output via a detail section, sometimes output in a group section like a group footer. Anyway, what I want to do is number each item so when people are talking about the report, they can say "Look at item 451" for example.

Appreciate the help.
 
You can do this by inserting the "special field" of RecordNumber Mike

Before: After
[morning] [bugeyed]
 
The recordnumber will have problems with groups, as they will duplicate the detail data.

If you construct formulas which use recordnumber as the numeric portion, and a character to demonstrate the section it's in:

GH1 GH1
D 1
D 2
D 3
GF1 GF3

You could sorta do this.

The other means isn't quite as simple, I think that you'd have to create a global variable and increment it at every line, but this way you can go with just a number.

ReportHeader:
whileprintingrecords
global numbervar LineItem:= 0;

Each section:
ReportHeader:
whileprintingrecords
global numbervar LineItem;
LineItem := LineItem+1

If you're using suppression or eliminating duplicates anywhere, you'd have to account for that.

-k
kai@informeddatadecisions.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top