Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2020 : Technical Questions
Message Icon Topic: Sum for Distinct of fields Post Reply Post New Topic
Author Message
crstar
Newbie
Newbie


Joined: 02 Aug 2012
Online Status: Offline
Posts: 31
Quote crstar Replybullet Topic: Sum for Distinct of fields
    Posted: 24 Jan 2013 at 7:59pm
Dear All Experts ,
 
I have a report with duplicate data as below:
 
DocNo     |     JobCode     |     PartNo     |     Amount    
----------------------------------------------------------------------------
0001              J01                     P01               100
0001              J01                     P01               100
0002              J02                     P01               500
0002              J02                     P02               700
 
I would like to have a sum which is only select for distinct of DocNo, JobCode, PartNo. The end resuld would be
 
DocNo     |     JobCode     |     PartNo     |     Sum    
----------------------------------------------------------------------------
0001              J01                     P01               100
0002              J02                     P01               500
0002              J02                     P02               700
 
Any idea how to do this? is it should insert running total and at evaluate filed, type some formula? Please advise.. thanks
IP IP Logged
crstar
Newbie
Newbie


Joined: 02 Aug 2012
Online Status: Offline
Posts: 31
Quote crstar Replybullet Posted: 24 Jan 2013 at 8:00pm
P/s: I couldn't use the "Select Distinct Records" as i using stored procedure in the report.
IP IP Logged
sanchezgmc06
Senior Member
Senior Member
Avatar

Joined: 21 Jan 2011
Online Status: Offline
Posts: 107
Quote sanchezgmc06 Replybullet Posted: 25 Jan 2013 at 5:24am

How about inserting a sumary at the report footer. For field to summarize: choose field DocNo and for calculate this summary: choose Distinct Records

IP IP Logged
crstar
Newbie
Newbie


Joined: 02 Aug 2012
Online Status: Offline
Posts: 31
Quote crstar Replybullet Posted: 03 Feb 2013 at 3:15pm
I use another method:
 
At Evaluate there, click formula, then type
DocNo & JobCode & PartNo 
this solve the problem
 
Clap


Edited by crstar - 03 Feb 2013 at 3:16pm
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.