Tips and Tricks
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Tips and Tricks
Message Icon Topic: count of multi select responses Post Reply Post New Topic
Author Message
bluelake
Newbie
Newbie
Avatar

Joined: 08 Jul 2010
Online Status: Offline
Posts: 24
Quote bluelake Replybullet Topic: count of multi select responses
    Posted: 21 Nov 2011 at 4:57am

How can I count the number of responses for each choice in a multi-select field?  I want the number of A's, B's, C's, etc.



Edited by bluelake - 21 Nov 2011 at 5:01am
IP IP Logged
comatt1
Senior Member
Senior Member
Avatar

Joined: 19 May 2011
Online Status: Offline
Posts: 337
Quote comatt1 Replybullet Posted: 02 Dec 2011 at 5:17am
using running totals you could; would each record only have a single value, but multiple potential options.
 
If so
 
running total - name
field to summ - {grade}
type - count
 
evaluate
formula -
{grade}='A'
 
Reset
Never (if wanting over whole report)
 
-------------
 
You would have to do this for each option-grade.
 
Otherwise, I would probably use shared variables.
 
in header define an initvar formula (leave in report header)
 
shared numbervar a=0;
shared numbervar b=0;
shared numbervar c=0;
...
 
Within the detail field, suppress a formula and have something like this
if {grade}='A' then
a:=a+1
else
if {grade}='B' then
b:=b+1
else
...etc
 
.....
 
In a footer you can then just list them  in a formula:
 
'Number of A scores: ' + a + char(13) +
'Number of B scores: ' + b + char(13) +
... etc
 
 
IP IP Logged
Post Reply Post New Topic
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum



This page was generated in 0.032 seconds.