Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Technical Questions
Message Icon Topic: Distinct sum? Post Reply Post New Topic
Author Message
kiwiana23
Newbie
Newbie
Avatar

Joined: 29 Jul 2012
Location: New Zealand
Online Status: Offline
Posts: 4
Quote kiwiana23 Replybullet Topic: Distinct sum?
     Posted: 29 Jul 2012 at 2:28pm
Hi there,

I'm trying to get a sum of a field where a different field is distinct. Here's an example of my report:


EID     Name     FTE     Leave     Balance
100001     TEST     1.00     Annual     100
100001     TEST     1.00     LSLeav     50
100002     TAXT     0.75     Annual     200
100002     TAXT     0.75     LSLeav     10
100003     SMIT     1.00     AltDay     2
100003     SMIT     1.00     Annual     85
100003     SMIT     1.00     LSLeav     15


I'm trying to sum the FTE column but I only want it to use the figures for each individual employee (so it should sum 1.00 + 0.75 + 1.00). Any thoughts on how to make this work?

I'm using Crystal Reports XI if that helps :)

Cheers,
MJ            
IP IP Logged
kevlray
Admin Group
Admin Group
Avatar

Joined: 29 Oct 2009
Online Status: Offline
Posts: 1587
Quote kevlray Replybullet Posted: 30 Jul 2012 at 5:13am
One possibility (provided that the Names are in order).  If you do a running total and evaluate only when {name}<>next({name}).  I hope this helps.
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