Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Report Design
Message Icon Topic: Count Formula Post Reply Post New Topic
Author Message
CoachGBT
Newbie
Newbie


Joined: 08 Apr 2011
Online Status: Offline
Posts: 29
Quote CoachGBT Replybullet Topic: Count Formula
     Posted: 08 Apr 2011 at 3:18am
I want to perform a count on a field (STATUS) that has several defined statuses (Open, Closed, Released). I want to a perform a count on each defined status. I'm sure it's a simple formula, but I am stumped.
 
Thanks,
CoachGBT
IP IP Logged
hilfy
Admin Group
Admin Group
Avatar

Joined: 20 Nov 2006
Online Status: Offline
Posts: 3702
Quote hilfy Replybullet Posted: 08 Apr 2011 at 3:36am
There are a couple of ways that you can do this. 
 
If your data is grouped by status, you can just do a count summary of some unique identifier in your data.  This will put the count in either the group header or the group footer for each status.
 
If you data is not grouped by status or if you want to show all of the counts in a summary at the end of the report, you'll do something like this:
 
1.  For each status, create a formula that looks something like this:
 
If {table.Status} = 'Open' then 1 else 0
 
2.  At the end of the report or at some group level you can then do a SUM of these formulas to get the count for each status.
 
-Dell
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