Counting on a report

S

Secret Squirrel

I'm looking to count the # of records for each of my 2 groups on my report. I
have 2 groups, "Quality", and "Documentation". What I want to do is have 2
controls on my report footer that will count the number of records for each
of these groups. One control will give me a count total for "Quality" and the
other will give me the count total for "Documentation". This is what I'm
using but it's counting all records:

TextControl1 =Abs(Count([VendorID]*([Type]="Documentation")))
TextControl2 =Abs(Count([VendorID]*([Type]="Quality")))

How do I set this up so that each of the above controls will only count the
records for that specific group?
 
K

Krzysztof Pozorek [MVP]

(...)
TextControl1 =Abs(Count([VendorID]*([Type]="Documentation")))
TextControl2 =Abs(Count([VendorID]*([Type]="Quality")))

How do I set this up so that each of the above controls will only count
the
records for that specific group?

Try Sum instead Count.
Expression ([Type]="Documentation") is a boolean value -1/0. Count counting
both (-1) and 0, but Sum only (-1).

TextControl1 = - Sum([Type]="Documentation")
TextControl2 = - Sum([Type]="Quality")

Kris, MVP, Poland
www.access.vis.pl
 
S

Secret Squirrel

Perfect! Thanks!

Krzysztof Pozorek said:
(...)
TextControl1 =Abs(Count([VendorID]*([Type]="Documentation")))
TextControl2 =Abs(Count([VendorID]*([Type]="Quality")))

How do I set this up so that each of the above controls will only count
the
records for that specific group?

Try Sum instead Count.
Expression ([Type]="Documentation") is a boolean value -1/0. Count counting
both (-1) and 0, but Sum only (-1).

TextControl1 = - Sum([Type]="Documentation")
TextControl2 = - Sum([Type]="Quality")

Kris, MVP, Poland
www.access.vis.pl
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top