Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Report Design
Message Icon Topic: Removing a zero from a running total Post Reply Post New Topic
Author Message
bmhardy
Newbie
Newbie
Avatar

Joined: 10 Jun 2011
Online Status: Offline
Posts: 3
Quote bmhardy Replybullet Topic: Removing a zero from a running total
     Posted: 10 Jun 2011 at 1:23am
I am trying to create a running total which does a unique count for user IDs. The problem I am facing is that some users have an ID of '0' and the running total counts the '0' as well so I always have one more in my total than expected.
 
Is there anyway I can insert a formula somewhere into the running total evaluation section that will only do the distinct count on anything greater than 0? 
...sorry I'm a technotard!

Regards

Ben
IP IP Logged
sharona
Senior Member
Senior Member
Avatar

Joined: 16 Oct 2008
Location: United States
Online Status: Offline
Posts: 255
Quote sharona Replybullet Posted: 10 Jun 2011 at 7:50am

you can use manual running totals

create a formula to use in the calculate

if id >0 then 1 else 0
 
RESET

The reset formula is placed in a group header report header to reset the summary to zero for each unique record it groups by.

whileprintingrecords;

Numbervar  X := 0;

 

CALCULATION

The calculation is placed adjacent to the field or formula that is being     calculated.

(if there are duplicate values; create a group on the field that is being calculated on. If there are not duplicate records, the detail section is used.

               whileprintingrecords;

Numbervar  X := x + {field}; ( or formula)

 

DISPLAY

The display is the sum of what is being calculated. This is placed in a group, page or report footer. (generally placed in the group footer of the group header where the reset is placed.)

               whileprintingrecords;

Numbervar  X;

                                                                                X

sharona
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