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?
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
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.