Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Technical Questions
Message Icon Topic: sum trouble Post Reply Post New Topic
Author Message
twdavis
Newbie
Newbie


Joined: 27 Jan 2011
Online Status: Offline
Posts: 2
Quote twdavis Replybullet Topic: sum trouble
     Posted: 27 Jan 2011 at 5:22am

I am trying to calculate freight charges on orders. My trouble is the table I am using list the total freight charge on each line .

 

The data look like this

 

ORDER# QTY    PART#    PRICE   EXT_PRICE   FREIGHT

000001     2         5505       10.00     20.00              14.95

000001     3         5504        5.00      15.00              14.95

 

Total                                                    35.00               29.90   

 

Total freight should be 14.95 for the whole order

 

 

Now a customer may have 2 or three orders that I want to total the EXT_PRICE AND FREIGHT but each time I do I end up calculating the freight for each line when it should be calculated one time.

 

IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 27 Jan 2011 at 5:54am
use a running total to calculate only on change of Order# and reset on Customer
name=CustomerFreight
field to sumamrize = Freight
Type = SUM
Evaluate = on change of field >Order#
Reset= on change of field > customer
Place in footers


Edited by DBlank - 27 Jan 2011 at 5:55am
IP IP Logged
twdavis
Newbie
Newbie


Joined: 27 Jan 2011
Online Status: Offline
Posts: 2
Quote twdavis Replybullet Posted: 27 Jan 2011 at 7:43am
That worked Perfect Thanks......
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