Hi,
Try this:
SELECT T0.[DocNum], T0.[DocDate], T0.[CardCode], T0.[CardName],
sum(T1.[Quantity]) [Total Cases],
T0.DocTotal - T0.VatSum - T0.DiscSum [Inv. Value (ex VAT)], T2.[TrnspName], T0.[Weight]/1000[Weight (kg)] FROM OINV T0 INNER JOIN INV1 T1 ON T0.DocEntry = T1.DocEntry INNER JOIN OSHP T2 ON T0.TrnspCode = T2.TrnspCode WHERE T0.[DocDate] >=[%0] AND T0.[DocDate] <=[%1] AND T1.[WhsCode] =[%2] GROUP BY T0.[DocNum], T0.[DocDate], T0.[CardCode], T0.[CardName], T2.[TrnspName], T0.[Weight], T0.DocTotal, T0.VatSum, T0.DiscSum ORDER BY T0.DocNum
Thanks & Regards,
Nagarajan