Hi Naga,
On your second query
WHERE T1.CardCode =$[ORDR.cardcode] and T0.ItemCode= $[RDR1.itemcode] and T1.DocDate>=dateadd(month,-3,convert (varchar(10),getdaTe(),112))
You included T0.ItemCode on your where clause and you want to put it on the header level UDF? which the T0.itemcode is on the row level
Please clarify.
Regards,
JP