Print Page | Close Window

Sum for Distinct of fields

Printed From: Crystal Reports Book
Category: Crystal Reports 9 through 2020
Forum Name: Technical Questions
Forum Discription: Formulas, charting data, Crystal syntax, etc.
URL: http://www.crystalreportsbook.com/forum/forum_posts.asp?TID=18893
Printed Date: 05 May 2024 at 5:51am


Topic: Sum for Distinct of fields
Posted By: crstar
Subject: Sum for Distinct of fields
Date 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



Replies:
Posted By: crstar
Date 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.


Posted By: sanchezgmc06
Date 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



Posted By: crstar
Date 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



Print Page | Close Window