Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2020 : Technical Questions
Message Icon Topic: cr 8.5 Sum a Formula Field Post Reply Post New Topic
Author Message
JBELL
Newbie
Newbie


Joined: 01 Jun 2010
Online Status: Offline
Posts: 3
Quote JBELL Replybullet Topic: cr 8.5 Sum a Formula Field
    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
 
 
IP IP Logged
kevlray
Admin Group
Admin Group
Avatar

Joined: 29 Oct 2009
Online Status: Offline
Posts: 1587
Quote kevlray Replybullet 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}?
IP IP Logged
JBELL
Newbie
Newbie


Joined: 01 Jun 2010
Online Status: Offline
Posts: 3
Quote JBELL Replybullet 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
IP IP Logged
JBELL
Newbie
Newbie


Joined: 01 Jun 2010
Online Status: Offline
Posts: 3
Quote JBELL Replybullet Posted: 01 Jun 2010 at 5:52am

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

IP IP Logged
kevlray
Admin Group
Admin Group
Avatar

Joined: 29 Oct 2009
Online Status: Offline
Posts: 1587
Quote kevlray Replybullet 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.
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.047 seconds.