Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Technical Questions
Message Icon Topic: Running Total Post Reply Post New Topic
Author Message
Ringl
Newbie
Newbie
Avatar

Joined: 22 Jun 2010
Online Status: Offline
Posts: 11
Quote Ringl Replybullet Topic: Running Total
     Posted: 22 Jul 2010 at 1:30pm
I need a running total that gives me a final or summary total at the end of the report - simple enough.  But the total has to consist of the 'distinct' count of one of the columns on change of group - not sure how to do that.
 
For instance, lets say the report has a group called 'Rock ID'.   For each Rock ID I have a column called 'Copy Num':
 
     Rock ID     Rock Name     Copy Num
      628          Slate               1
                      Marble             2
                      Granite            30
 
      859          Agate               1
                      Magma             1
                      Clay                  1
 
      446          Lava                 1
                      Fossil               30
                      Crystal             31
 
So I'm looking for a grand total of 7 for Copy Num.  Any suggestions?  Answer's probably really simple but I just don't see it. Smile
Ringl
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 22 Jul 2010 at 3:27pm
create a formula field to concantenate RockId and Copy Num together then just do a distinctCount on that formula
assuming they are both numeric fields
totext(table.rockid,0,'')+'-'+ totext(table.copynum,0,'')
IP IP Logged
Ringl
Newbie
Newbie
Avatar

Joined: 22 Jun 2010
Online Status: Offline
Posts: 11
Quote Ringl Replybullet Posted: 23 Jul 2010 at 7:12am
That worked awesomely!!!

Thanks Clap
Ringl
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