Query used to get the Goods Issue details. SELECT T0.[Docentry], T0.[DocNum], T0.[DocDate], T0.[DocDueDate], T0.[NumAtCard], T0.[CardName], T0.[DocTotal],T0.[Comments],T0.[Docentry], T1.[ItemCode], T1.[Dscription], T1.[Quantity], T1.[Price], T1.[LineTotal], T1.[WhsCode],T2.[InvntryUoM],T1.[WhsCode] FROM OIGE T0 INNER JOIN IGE1 T1 ON T0.[DocEntry] = T1.[DocEntry] INNER JOIN OITM T2 ON T1.[ItemCode] = T2.[ItemCode] inner JOIN OITW T3 ON T2.[ItemCode] = T3.[ItemCode] and T1.[Whscode] = T3.[Whscode] Query used to get the Bin location SELECT T4.[WhsCode], T6.Descr as 'Bin Row',T0.[ItemCode] AS 'ItemCode',t5.ItemName, MAX(T0.[OnHandQty]) AS 'Quantity', T1.[BinCode] AS 'Bin Code', t5.AvgPrice, (t5.AvgPrice * T0.OnHandQty) as 'Ext Value' FROM [dbo].[OIBQ] T0 INNER JOIN [dbo].[OBIN] T1 ON T0.[BinAbs] = T1.[AbsEntry] left JOIN OITW T4 ON T1.[AbsEntry] = T4.[DftBinAbs] left JOIN OITM T5 ON T0.itemcode = T5.ItemCode INNER JOIN OBSL T6 ON T1.[SL1Abs] = T6.[AbsEntry] and T0.[OnHandQty] <> 0 LEFT OUTER JOIN [dbo].[OBBQ] T2 ON T0.[BinAbs] = T2.[BinAbs] AND T0.[ItemCode] = T2.[ItemCode] AND T2.[OnHandQty] <> 0 LEFT OUTER JOIN [dbo].[OSBQ] T3 ON T0.[BinAbs] = T3.[BinAbs] AND T0.[ItemCode] = T3.[ItemCode] AND T3.[OnHandQty] <> 0 WHERE T1.[AbsEntry] >= (0) AND T4.[WhsCode] =T0.Whscode GROUP BY T0.[BinAbs], T0.[ItemCode],T5.AvgPrice,T6.Descr,T0.OnHandQty,T5.ItemName,T4.[WhsCode],T1.BinCode Also tried linking the subreport using item code and warehouse but it is showing me all the bin location which we have in content list it should show up only the one from where item is picked up to issue Regards- Monika
↧