Hi All,
I have a sub report in that i created a formula like this.
local numberVar vararesult;
local numbervar ads ;
local numbervar atrans;
if ({Command.tarAds})>=({Command.actAds}) and ({Command.tarTrans})>=({Command.actTrans})
then vararesult := {Command.tarSale}-{Command.actSale}
else (
if {Command.tarAds}>{Command.actAds} then
ads := {Command.tarAds}
else
ads := {Command.actAds};
if {Command.tarTrans}>{Command.actTrans} then
atrans :={Command.tarTrans}
else
atrans :={Command.actTrans};
vararesult := (ads *atrans)-{Command.actSale} )
Now in the main report i need to show sum of this formula.I tried using shared variable but getting errors,as my formula already contains some local variables.
Ex:
12
3
4
5
sum: 24
Please suggest