mischarges on purchpackingslip Report in ax 2012R3

hi expert i have facing problem from several weeks, the problem is ,i want to show mischarges on purchpackingslip report in ax 2012,Although we have already done it in ax 2009,but now we want to implement the same in ax 2012 R3,i can’t find any solution how to do it…!?

code of ax 2009 are under…

// this code for mischarges displaying on purchpacking slip report/
Display str MiscChargesValues()
MarkUpTrans markupTrans;
PurchLine purchLine;
VendPackingSlipTrans tempVPST;

str res;

While Select SUM(Value) from markupTrans
join purchLine
join tempVPST
Group by markupTrans.MarkupCode
Where markupTrans.TransRecId == purchLine.RecId
&& markupTrans.TransTableId == purchLine.TableId
&& tempVPST.InventTransId == purchLine.InventTransId
&& tempVPST.PackingSlipId == VendPackingSlipJour.PackingSlipId
&& tempVPST.purchId == VendPackingSlipJour.purchId
res += “\n” + strfmt("%1", markupTrans.Value);
totalCharges += markupTrans.Value;

return substr(res,2,strlen(res));


now in ax 2012 i am basically what i am use the logic…

As the data of mischarges are coming from markuptrans table (value field), so just add that field in purchpackingslip table and then reference that field to purchpackingslipDP class,call that ax 2009 copied method to that field …but stil no result…

please guide me in this Regards…