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

Counter

Status
Not open for further replies.

DBAFrog

Programmer
Sep 26, 2002
61
US
What it the FORMULA for adding a counter to the DETAIL line?

VarNum x :=0;
x=x+1;

Returns 1 for every detail line.

This has to be a fairly common thing. I don't know why I can't find a special field for LINE NUMBERING

thanks,

Frog

 
It's called RecordNumber and is located in Functions under Print State
 
SWEEEEEEEET....


Thanks, I was going batty with this ...


Frog

------------------
Curious by Nature,
Linux by Design
 
To use a variable, you would use:

whileprintingrecords;
numbervar x := x + 1;

-LB
 
Thanks,
I'll file BOTH away for use in the future


Frog

------------------
Curious by Nature,
Linux by Design
 
Being new to Crystal Reports I am trying to understand what was just said:

If I want a total count of records instead of any details contained in the records themselves, which formula would I use? For clarification, I have 13,0000 records that contain information by region and status. I want the records sorted by region and then sorted by the status and just a count by status--something like--

"MidWest Region-Status: Deployed--6,708"
"Eastern Region-Status: Cancelled--34"

etc
 
You would group on region, and then group on status. Then use a recurrent field that represents the level you want to count. Since you have indicated that there are details within "Records" that you don't want to count, you could pick the field that is unique to your "record", e.g., {table.recordID}, and then right click on it, and insert a summary (distinctcount) at all group levels. The word "record" is used generally to mean a detail record, so you might want to be cautious about using this term if this is not what you mean.

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top