Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Technical Questions
Message Icon Topic: Best way to sum up results Post Reply Post New Topic
Author Message
Tod Troy
Newbie
Newbie


Joined: 22 Jun 2010
Online Status: Offline
Posts: 2
Quote Tod Troy Replybullet Topic: Best way to sum up results
    Posted: 22 Jun 2010 at 6:42am
New Crystal Reports 2008 user here and I have a question about summing up results in a report. I'm not sure if I'm going about this the right way, so any advice is appreciated.

In my report there are about a dozen conditions that a client might have. I'm using variations of this formula (@condition) to show when they do (this result appears on the report):

if{label}="condition"
and{result}="Yes"
then"Y"

I have variations of this formula (@conditioncount) going on to try to give a number to the results:

if{@condition}="Y"
then ToNumber(1)

Then in the page footer I'm using a running total field that summarizes the @conditioncount using a sum.

The problem I'm running into is that when the report pulls, say, 5 clients with two same results the running total field tells me the total is 66 for this result. I noticed at the bottom of the screen that "Records" is indicating that there's way more records than are actually displaying, but I'm not suppressing any results so I don't know why this number would be higher.

Any ideas?
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 22 Jun 2010 at 7:03am
suppressing does not impact the sum or count.
make a Running Total
Name=condition1
Field to summarize=Client ID field
Type of Summary=DistinctCount
Evaluate=Use a Formula
{label}="condition" and {result}="Yes"
Reset=Never
Place in the report footer.
Reeapt fro each ciondition you want to count
IP IP Logged
Tod Troy
Newbie
Newbie


Joined: 22 Jun 2010
Online Status: Offline
Posts: 2
Quote Tod Troy Replybullet Posted: 22 Jun 2010 at 7:32am
Excellent- works like a charm! Thanks so much!
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.016 seconds.