Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Technical Questions
Message Icon Topic: Summary of a formula not working Post Reply Post New Topic
Author Message
Megan10e
Newbie
Newbie


Joined: 19 Aug 2010
Online Status: Offline
Posts: 24
Quote Megan10e Replybullet Topic: Summary of a formula not working
     Posted: 11 Nov 2010 at 7:45am

In my report, I'm trying to include a sum of customers' order totals. The database lists each order separately, so I want to sum the order totals for each customer.

However, I want to exclude certain items in the orders, so I had to use a formula to calculate the individual order totals: (qty * unit price). Now I want to sum up the individual totals for each customer, but none of my sums are coming out correctly.
 
I tried just creating a summary of the formula in the group footer, but that is giving me a different total than just the sum of the individual order totals.
 
I have my report grouped by order number, to get the necessary totals for each order, which I will then hide, and then by customer, to show the summaries as totalled by customer.
 
Not sure if I explained that well, but let me know if you can help me!
Thanks!
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 11 Nov 2010 at 8:07am
suppressing fields do not exclude them from summaries.
Usually you can just use running totals that have condtional evaluate formulas to include or exclude rows that you do not want to sum or count


Edited by DBlank - 11 Nov 2010 at 8:07am
IP IP Logged
Megan10e
Newbie
Newbie


Joined: 19 Aug 2010
Online Status: Offline
Posts: 24
Quote Megan10e Replybullet Posted: 11 Nov 2010 at 9:09am
My formula to get the individual order totals is: qty * unit price. The name of that formula is @order total.
 
Then I tried using this formula: sum({@order total}, {customer.name}) to sum the order totals for each customer, but the totals come out higher than they should.
 
I tried just doing a summary, and I tried various running totals, but nothing has come out right.
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 11 Nov 2010 at 9:11am

can you post sample row level data as it exists and them how you want it to appear.

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