i have a formula field called rawmaterial in which i have written the following coding.
WhilePrintingRecords;
Shared StringVar MaterialNo;
StringVar ItemNoMain;
if {V_ARINVT_AVAIL_PROJECTED_DTL.SOURCE}="PO" THEN
ItemNoMain:= {ARINVT.ITEMNO}
ELSE
ItemNoMain:=MaterialNo
------------------------------------
the report displaying ItemNoMain correctly, but my problem is i want to group the itemNoMain data