Hi,
I am using Crystal Reports XI. I am trying to add a column that calculate the margin in a cross-tabs.
I tried to follow one of tec-tips but it does not work for me.
I've selected suppress, and then x+2 for inner cell and the rows total:
whileprintingrecords;
numbervar Sales:= {SO_SalesHistory.DollarsSold};false
and
whileprintingrecords;
numbervar COGS:= {SO_SalesHistory.CostOfGoodsSold};
false
Then I've created a formula {@0} and added it as my last summary field in the crosstab. Then I formated field under Display String; x+2 as below.
whileprintingrecords;
numbervar Sales;
numbervar COGS;
if Sales <> 0.00 then totext((Sales-COGS)%Sales,2)+"%"//2 for 2 decimals else 0.00
Please help me to improve the formulas.
I am using Crystal Reports XI. I am trying to add a column that calculate the margin in a cross-tabs.
I tried to follow one of tec-tips but it does not work for me.
I've selected suppress, and then x+2 for inner cell and the rows total:
whileprintingrecords;
numbervar Sales:= {SO_SalesHistory.DollarsSold};false
and
whileprintingrecords;
numbervar COGS:= {SO_SalesHistory.CostOfGoodsSold};
false
Then I've created a formula {@0} and added it as my last summary field in the crosstab. Then I formated field under Display String; x+2 as below.
whileprintingrecords;
numbervar Sales;
numbervar COGS;
if Sales <> 0.00 then totext((Sales-COGS)%Sales,2)+"%"//2 for 2 decimals else 0.00
Please help me to improve the formulas.