I am trying to get a grand total for all groups.
I have groups with totals for items and totals for cost. I multiple the total items by their cost.
ITEM (each of these are groups) QNTY (this is a group summary) COST (@TotalCost)
Adult Cric Kit 2 $10.08
Ambu Bag Mask and Tubing, Adult 3 $26.31
Blade mac 2 1 $ 3.49
Blade mac 3 1 $ 3.49
Blade mil 2 4 $13.96
For this report
I created a formula to show cost for each item.
Formula Name: TotalCost2
if {UDF.Caption} = "Adult Cric Kit" then 5.04 else
if {UDF.Caption} = "Ambu Bag Mask and Tubing, Adult" then 8.77 else
if {UDF.Caption} = "Blade mac 2" then 3.49 else
if {UDF.Caption} = "Blade mac 3" then 3.49 else
if {UDF.Caption} = "Blade mac 4" then 3.49 else
if {UDF.Caption} = "Blade mil 0" then 3.40 else
if {UDF.Caption} = "Blade mil 1" then 3.49 else
if {UDF.Caption} = "Blade mil 2" then 3.49 else
if {UDF.Caption} = "Blade mil 3" then 3.49
I then multipled the cost by the sum of items in each group which returned a currency field (This formula is correct, returns the correct numbers)
Formula Name: TotalCost
{@TotalCost2} * Sum ({UDD.DataInt}, {UDF.Caption})
Next - I created a the following formula and placed in the report header
whileprintingrecords;
numbervar x;
if not inrepeatedgroupheader then
x := 0;
This next formula is where the problem lies -- it will not accept {@TotalCost} - it says "A number is required here"
whileprintingrecords;
numbervar x := x + x + {@TotalCost}
Formula placed in footer:
whileprintingrecords;
numbervar x;
Any ideas???
I have groups with totals for items and totals for cost. I multiple the total items by their cost.
ITEM (each of these are groups) QNTY (this is a group summary) COST (@TotalCost)
Adult Cric Kit 2 $10.08
Ambu Bag Mask and Tubing, Adult 3 $26.31
Blade mac 2 1 $ 3.49
Blade mac 3 1 $ 3.49
Blade mil 2 4 $13.96
For this report
I created a formula to show cost for each item.
Formula Name: TotalCost2
if {UDF.Caption} = "Adult Cric Kit" then 5.04 else
if {UDF.Caption} = "Ambu Bag Mask and Tubing, Adult" then 8.77 else
if {UDF.Caption} = "Blade mac 2" then 3.49 else
if {UDF.Caption} = "Blade mac 3" then 3.49 else
if {UDF.Caption} = "Blade mac 4" then 3.49 else
if {UDF.Caption} = "Blade mil 0" then 3.40 else
if {UDF.Caption} = "Blade mil 1" then 3.49 else
if {UDF.Caption} = "Blade mil 2" then 3.49 else
if {UDF.Caption} = "Blade mil 3" then 3.49
I then multipled the cost by the sum of items in each group which returned a currency field (This formula is correct, returns the correct numbers)
Formula Name: TotalCost
{@TotalCost2} * Sum ({UDD.DataInt}, {UDF.Caption})
Next - I created a the following formula and placed in the report header
whileprintingrecords;
numbervar x;
if not inrepeatedgroupheader then
x := 0;
This next formula is where the problem lies -- it will not accept {@TotalCost} - it says "A number is required here"
whileprintingrecords;
numbervar x := x + x + {@TotalCost}
Formula placed in footer:
whileprintingrecords;
numbervar x;
Any ideas???