Writing Code
 Crystal Reports Forum : Crystal Reports .NET 2003 : Writing Code
Message Icon Topic: Distinct Count Formula problem Post Reply Post New Topic
Author Message
andyme
Newbie
Newbie
Avatar

Joined: 19 Feb 2010
Location: United Kingdom
Online Status: Offline
Posts: 15
Quote andyme Replybullet Topic: Distinct Count Formula problem
    Posted: 22 Jun 2011 at 2:32am
Hi all,

Wonder if you could help, on my report I have a distinct count of the Employee_No fields on a group field. On the same field though I need to also display the distinct no of employees by their age group. like in the example below. I have came to conclusion it needs to be done in a formula but having a little trouble with writing it, it's probably something dead simple. Any questions just ask. Thanks

Total Number     Age group      Age group     Age group
of Employees:      <30:        30-50:        50+
    90               20            55           15

IP IP Logged
hilfy
Admin Group
Admin Group
Avatar

Joined: 20 Nov 2006
Online Status: Offline
Posts: 3701
Quote hilfy Replybullet Posted: 25 Jul 2011 at 8:17am
You'll need a separate formula for each age group.  They'll look something like this:
 
{@Less Than 30}
If {table.age} < 30 then {table.Employee_no}
 
You then do a distinct count of each of these formulas to get the number in each age group.
 
-Dell
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.031 seconds.