Stella1209
Programmer
I am using CR V5 and I have a problem getting Grand totals.The Grand Total field should be placed in Report Footer.
I created Running Total Formulas for Customer, Brunch and Region. For a Grand totals I need to get the SUM of the Region only because Brunch total already includes total for Customers and Region Total includes total for Brunch.It's like a nested Subtotals.
As an example I'll put my Running total Formula for a region:
//goes in group header for Region
WhilePrintingRecords;
if OnFirstRecord = false then
CurrencyVar RunningTotal4:=0
else
RunningTotal4:={C_ILSOBG.DIFF_QTY}
//goes in the detail section
WhilePrintingRecords;
CurrencyVar RunningTotal4;
If {CUS_LOC.NAME} = Previous ({CUS_LOC.NAME}) and {C_ILSOBG.SALES_REP}=Previous ({C_ILSOBG.SALES_REP}) and {SO.SO} = Previous ({SO.SO}) and {C_ILSOBG.SO_LINE}=Previous ({C_ILSOBG.SO_LINE}) and {C_ILSOBG.ITEM}=Previous ({C_ILSOBG.ITEM}) and {C_ILSOBG.DIFF_QTY}= Previous ({C_ILSOBG.DIFF_QTY}) and {C_ILSOBG.TRAN_AMT} = Previous ({C_ILSOBG.TRAN_AMT}) and {C_ILSOBG.DIFF_UNIT_PRICE}=Previous ({C_ILSOBG.DIFF_UNIT_PRICE}) Then
RunningTotal4 :=RunningTotal4
else
RunningTotal4 :=RunningTotal4 + {C_ILSOBG.DIFF_QTY}
//goes in the group footer for Region
WhilePrintingRecords;
CurrencyVar RunningTotal4
Please help me if you have any idea. Thanks in advance.
Stella
I created Running Total Formulas for Customer, Brunch and Region. For a Grand totals I need to get the SUM of the Region only because Brunch total already includes total for Customers and Region Total includes total for Brunch.It's like a nested Subtotals.
As an example I'll put my Running total Formula for a region:
//goes in group header for Region
WhilePrintingRecords;
if OnFirstRecord = false then
CurrencyVar RunningTotal4:=0
else
RunningTotal4:={C_ILSOBG.DIFF_QTY}
//goes in the detail section
WhilePrintingRecords;
CurrencyVar RunningTotal4;
If {CUS_LOC.NAME} = Previous ({CUS_LOC.NAME}) and {C_ILSOBG.SALES_REP}=Previous ({C_ILSOBG.SALES_REP}) and {SO.SO} = Previous ({SO.SO}) and {C_ILSOBG.SO_LINE}=Previous ({C_ILSOBG.SO_LINE}) and {C_ILSOBG.ITEM}=Previous ({C_ILSOBG.ITEM}) and {C_ILSOBG.DIFF_QTY}= Previous ({C_ILSOBG.DIFF_QTY}) and {C_ILSOBG.TRAN_AMT} = Previous ({C_ILSOBG.TRAN_AMT}) and {C_ILSOBG.DIFF_UNIT_PRICE}=Previous ({C_ILSOBG.DIFF_UNIT_PRICE}) Then
RunningTotal4 :=RunningTotal4
else
RunningTotal4 :=RunningTotal4 + {C_ILSOBG.DIFF_QTY}
//goes in the group footer for Region
WhilePrintingRecords;
CurrencyVar RunningTotal4
Please help me if you have any idea. Thanks in advance.
Stella