Calculation Amount Inventory with Standard Cost

Hi EveryBody

I desgin one reports. Calculation Amount of Inventory of Item Code * Standard Cost (table Stockkeeping Unit)

This is code I write :

Value Entry - OnAfterGetRecord()

IF Stockkeeping.GET(“Item No.”) THEN
SETFILTER(“Location Code”,Item.GETFILTER(“Location Filter”));
SETFILTER(“Location Code”,‘BLUE’);
Stockkeeping.SETFILTER(“Location Code”,‘BLUE’);
Stockkeeping.SETRANGE(“Item No.”,“Value Entry”.“Item No.”);

TotaAmountBLUE:= TotalBLUE *Stockkeeping.“Standard Cost”;

Results Standard Cost by Location inaccurate. TotaAmountBLUE wrong.

Please help me edit code. Thanks so much.