Print Page | Close Window

cr 8.5 Sum a Formula Field

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=10153
Printed Date: 27 Apr 2024 at 3:09pm


Topic: cr 8.5 Sum a Formula Field
Posted By: JBELL
Subject: cr 8.5 Sum a Formula Field
Date Posted: 01 Jun 2010 at 4:36am
Hi All
Hope you can help -
 
I have a report that contains fields as below 
 
Order No
Customer No
Order Volume
 
Each order has a volume, and each Customer can have numerous orders,
At Grp Footer I have introduced two formula fields - one that sums the Order Volume by Customer then converts the volume to a pallet quantity based on a conversion factor.
Secondly I have used the truncate condition to round up the returned volume from the previous calculation  - basically for example 1.2 pallets is rounded to 2 pallets etc.
This works fine in the group footer and returns the correct values however.........
 
Customer    Order Volume      Pallets        Rounded Pallets
  AAAA             4.2                     3.2                 4
  BBBB             0.4                     0.5                 1
  CCCC            2.1                     1.7                 2
 
                                                                       
I need one final value in the Report footer which is  the sum of the rounded up qty - this I cannot get -
 
The value I need is "7" which is the sum of the Calculation which rounds up the converted volume.
 
I cannot use the calculation at Report Footer level as this will consolidate the volume for all the order and thus return the incorrect number of pallets.
 
The correct answer is the sum of the Formula Field {RoundedPallets]
 
Would be grateful if anyone can help
 
Thanks
 
 



Replies:
Posted By: kevlray
Date Posted: 01 Jun 2010 at 5:20am

I am a bit confused.  You say that you cannot use a 'calculation at Report Footer level'.  But, you 'need one final value in the Report footer'.

Have you tried creating a running total using {RoundedPallets}?


Posted By: JBELL
Date Posted: 01 Jun 2010 at 5:29am
Sorry for the confusion
 
At report footer level I cannot use the calculation I have used at other levels as this will return the incorrect answer
 
Example
 
Customer -      Volume    Pallets      Rounded Pallets
 
AAAA                   2.3         1.2              2
BBBB                   4.3          3.1             4
CCCC                  0.2         0.9              1
 
At report footer level I want to see 7 which is the sum of the Rounded Pallets - if I use the  calculation I have used at all other levels this will be false as it would consolidate the volume for all orders and then round the value to convert to pallets - in reality different orders cannot be consolidated.
 
I just need a way of returning the sum of the rounded pallets value.
 
Cheers


Posted By: JBELL
Date Posted: 01 Jun 2010 at 5:52am

Also I cannot create a running sum on a formula field can I ?



Posted By: kevlray
Date Posted: 03 Jun 2010 at 5:08am
I have, you have to be careful not to have any summation (max, sum, etc.) functions in the formula.



Print Page | Close Window