Topic: Sum of a Formaula Posted: 25 Mar 2013 at 3:33am
My setup is as follow:
Group 1 : Store Number
Group 2 : Item
in Group 2 I have an formula to determine the Gross sales.
@grossales
if {@returns} <> 0 then
(({@unitsold} * {SINVOICED.NETPRIATI_0}) - {@returns})
else ({@unitsold} * {SINVOICED.NETPRIATI_0})
@unitsreturned
if {SINVOICE.SIVTYP_0} = 'INV'
then 0
else if {SINVOICE.SIVTYP_0} = 'CRV'
then {SINVOICED.QTYSTU_0} * -1
I now want to Sum the total in Group2 and put the value in Group 1 header.
the formula I am trying is. I get an error stating that a field can not be summarized.
You can use running totals to arrive this summary, but you can't place this summary on group header 1. May be you may have to use gorup footer to display this values.
Try the following running total formula :
Whileprintingrecords;
Numbervar x:=0; // Place this on your group header 1
Whileprintingrecords;
Numbervar x:=x+SUM(@grosssales,@stores) // place this on your group 2 where you have summary.
Whileprintingrecords;
Numbervar x; //Place this on group footer 1
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