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!

calculated field

Status
Not open for further replies.

rjm13

Programmer
Feb 1, 2002
60
US
I'm trying to count the number of records when a specific field is equal to 1. I want to group on a different field, not this field. Should this be done with a formula? How?

Thanks.
Ron
 
Try using a running total field with summary type set to count. Use a formula (Evaluate section of the Create Running Total Field dialog) to specify that the field must equal 1.
 
I prefer a formula, which allows cleaner total and formulas:

If {field} = 1
then 1
else 0

Now group on your OTHER field, but subtotal this formula for that group. You will use SUM to find the number of records, since counting will count both the ones and the zeros.
Ken Hamady, On-site Custom Crystal Reports Training & Consulting
Public classes and individual training.
Guide to using Crystal in VB
tek@kenhamady.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top