views:

17

answers:

1

Hi i have a long formula field which I would like to include as the cross tab report summary field. However after I define the formula field I don't see it in my crosstab screen. How to include it ? Here is my formula field

    WhilePrintingRecords;
numberVar rt;
numberVar layMdp;
numberVar totMdp;

rt=Round(({Command.GENGNPIAMT}/{Command.TOTALGNP})*100,2);
layMdp:={Command.GENPREMMDP};
totMdp:=(layMdp)*Truncate((rt/100),4);

Also if I place this formula field inside details section, it shows a zero. Why is it not calculating anything ? I like it to calculate values as per each cross-tab column.

+1  A: 

You're setting the variables but the formula itself is not returning anything. If you want to return the value of totMdp, just add it after the last line:

WhilePrintingRecords;
numberVar rt;
numberVar layMdp;
numberVar totMdp;

rt=Round(({Command.GENGNPIAMT}/{Command.TOTALGNP})*100,2);
layMdp:={Command.GENPREMMDP};
totMdp:=(layMdp)*Truncate((rt/100),4);
totMdp
Ryan
thanks there was a':=' missing in first line also.
Popo