Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2020 : Technical Questions
Message Icon Topic: Average Summary of formula field with Sum? Post Reply Post New Topic
Author Message
RafaZa
Newbie
Newbie
Avatar

Joined: 08 Jun 2009
Location: Peru
Online Status: Offline
Posts: 3
Quote RafaZa Replybullet Topic: Average Summary of formula field with Sum?
    Posted: 24 Jun 2009 at 6:59am
Hello,
 
I know there should be a way to do this, I just don't know how. I need to produce an average summary of {@TrimPercent}, which is placed in the details part of my report, but Crystal Reports doesn't give me that option because there is a SUM in part of the formula:
 
{@TrimPercent} = Totext(({@Trim} * 100 ) / {@PaperWidth}) + '%'
 
where
(({report_CorrugatorProductionView.PaperWidth}) /1000000) - Sum ({@OrderWidth}, {report_CorrugatorProductionView.SetupId})
 
{@PaperWidth} = {report_CorrugatorProductionView.PaperWidth}/ (1000000)
 
{@OrderWidth} = {report_CorrugatorProductionView.Outs} * {report_CorrugatorProductionView.Width} / 1000000
 
How can I insert a summary for @TrimPercent? I have been trying to take out SUM of the formula and do a Running Total of that part but didn't work. I would appreciate any suggestions or thoughts about this. Thanks in advance.
 
-RZ 
 
IP IP Logged
lockwelle
Moderator
Moderator


Joined: 21 Dec 2007
Online Status: Offline
Posts: 4372
Quote lockwelle Replybullet Posted: 24 Jun 2009 at 11:31am
create a shared variable, actually 2, one that is the running sum and the other how many items.  Then increment the values accordingly.
 
When you want to display the average you would write a formula that calculates it....don't forget to reset the variables if you change groups or whenever the average should start over.
 
HTH
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.016 seconds.