Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Report Design
Message Icon Topic: Sum of Average Price Post Reply Post New Topic
Author Message
gizmosilly
Newbie
Newbie
Avatar

Joined: 04 Aug 2009
Location: United States
Online Status: Offline
Posts: 26
Quote gizmosilly Replybullet Topic: Sum of Average Price
     Posted: 21 Sep 2009 at 9:47am
I have created a report where in the Group footer I have added the following fields (they are sums of the detail) units sold, sales , unit price, average price, Since I took the sum of the group for sales,divided by the sum of the group for units sold to get the average price i can not do a sum in the report footer. Can anyone help me get a sum of the average price?
IP IP Logged
cmpgeek
Newbie
Newbie
Avatar

Joined: 11 Dec 2007
Online Status: Offline
Posts: 39
Quote cmpgeek Replybullet Posted: 21 Sep 2009 at 11:31am

try using these variables: 

Formula 1 “Reset To Zero” (Place it in GH - suppressed)

          Whileprintingrecords;

          GLOBAL NumVar AVG:= 0;

 
Formula 2 “Total up the charges” (Place it in Detail - suppressed)

          Whileprintingrecords;

GLOBAL NumVar AVG;

AVG := AVG + {@average};

 
 Formula 3 “Display the total charge” (Place it in GF)

          Whileprintingrecords;

GLOBAL NumVar AVG;

          AVG;
 
HTH
 
IP IP Logged
Jyothi Yepuri
Senior Member
Senior Member


Joined: 11 May 2009
Location: Australia
Online Status: Offline
Posts: 127
Quote Jyothi Yepuri Replybullet Posted: 21 Sep 2009 at 4:41pm
Create a formula and place it in GF

Sum of sales/ Sum Units sold

Use sum fields(sums of the detail) which are group footer in the above formula instead of creating sum on average price field..

HTH,
Jyothi
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