Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Report Design
Message Icon Topic: Running Total Fields Post Reply Post New Topic
Author Message
Goldberg
Groupie
Groupie
Avatar

Joined: 15 Apr 2011
Location: Portugal
Online Status: Offline
Posts: 58
Quote Goldberg Replybullet Topic: Running Total Fields
     Posted: 24 Jun 2011 at 5:05am
Hello,

I have a  report where is shows the gender of every student of a class, depending on if its M (male) or F (female), just like this:

1 - Erika       F
2 - Rolland   M
3 - Peter      M
4 - Lily          F
5 - Anna       F

I'd like to know how can I calculate how many Male and Female students are there in total.
 
Using the names above, it would be something like:
Female: 3
Male: 2

How can I do it?
Thanks

IP IP Logged
kostya1122
Senior Member
Senior Member
Avatar

Joined: 13 Jun 2011
Online Status: Offline
Posts: 475
Quote kostya1122 Replybullet Posted: 24 Jun 2011 at 6:35am
create 2 formulas like
 "maleCounts"
if "your M/F field" = "M" then count("your M/F field")
"FemaleCounts"
if "your M/F field" = "F" then count("your M/F field")


IP IP Logged
Goldberg
Groupie
Groupie
Avatar

Joined: 15 Apr 2011
Location: Portugal
Online Status: Offline
Posts: 58
Quote Goldberg Replybullet Posted: 27 Jun 2011 at 12:31am
Thanks for the answer, kostya1122.

Somehow it isn't working right. This is what I got:

http://imageshack.us/photo/my-images/696/genderq.jpg/
(Femininos = Females ; Masculinos = Males)

What is wrong?


Edited by Goldberg - 27 Jun 2011 at 1:34am
IP IP Logged
Goldberg
Groupie
Groupie
Avatar

Joined: 15 Apr 2011
Location: Portugal
Online Status: Offline
Posts: 58
Quote Goldberg Replybullet Posted: 28 Jun 2011 at 9:38pm
Anyone?
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 29 Jun 2011 at 3:42am
create 2 Running Totals
First One
name= male
field to summarize=name
type=count
evalaute = use a formula
table.gender = "M"
reset = never
place in the report footer
 
second
name= female
field to summarize=name
type=count
evalaute = use a formula
table.gender = "F"
reset = never
place in the report footer
IP IP Logged
Goldberg
Groupie
Groupie
Avatar

Joined: 15 Apr 2011
Location: Portugal
Online Status: Offline
Posts: 58
Quote Goldberg Replybullet Posted: 29 Jun 2011 at 4:32am
Yes, DBlank, it worked! Thank you very much!
IP IP Logged
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