We have three sale teams. They are selling three products in five cities. I am developing a monthy report. The report style is:
Product1 Product2 Product3 Total
Team1 x1 x2 x3 x4
Team2 y1 y2 y3 y4
Team3 z1 z2 z3 z4
Summary: subTOTAL
I have developed three running total fields x4, y4, and z4. The group field is Month. The problem is I can't get the correct result of formula subTOTAL. Here is how I define the formula subTOTAL:
---------------------------------------
WhilePrintingRecords;
NumberVar subTotal;
if {#x4} <> 0 then subTotal := subTotal + {#x4};
if {#y4} <> 0 then subTotal := subTotal + {#y4};
if {#z4} <> 0 then subTotal := subTotal + {#z4};
subTotal;
----------------------------------------
Did I do something wrong? or do I have better solution? Any suggestion is great appreciated!
Product1 Product2 Product3 Total
Team1 x1 x2 x3 x4
Team2 y1 y2 y3 y4
Team3 z1 z2 z3 z4
Summary: subTOTAL
I have developed three running total fields x4, y4, and z4. The group field is Month. The problem is I can't get the correct result of formula subTOTAL. Here is how I define the formula subTOTAL:
---------------------------------------
WhilePrintingRecords;
NumberVar subTotal;
if {#x4} <> 0 then subTotal := subTotal + {#x4};
if {#y4} <> 0 then subTotal := subTotal + {#y4};
if {#z4} <> 0 then subTotal := subTotal + {#z4};
subTotal;
----------------------------------------
Did I do something wrong? or do I have better solution? Any suggestion is great appreciated!