WHY IT RETURNS 0 WHEN I CREATE A FORMULA FIELD IN CRYSTAL REPORT?

CODE:
Code:
if {Consumption_Branch;1.CLASSIFICATION}="CHILLED"  then
if {Consumption_Branch;1.Vatable}=True then
global numbervar GTotal:=GTotal + Sum ({Consumption_Branch;1.TOTALCOST}, {Consumption_Branch;1.UOM})/1.12
else
global numbervar GTotal:=GTotal + Sum ({Consumption_Branch;1.TOTALCOST}, {Consumption_Branch;1.UOM})
I group my report by classification and sum its total total cost per item but i want to sum the total cost per classification with the code above that calculates items with and without vat..