Hi
What is wrong with this query
SELECT L.DocDate as 'Date', L.ItemCode, L.Dscription,
(SELECT Sum(TaxSum) FROM INV4 where statype=-90 and DocEntry=M.DocEntry) as 'ED (Rs.)',
(SELECT Sum(TaxSum) FROM INV4 where DocEntry=M.DocEntry) as 'Tax Total(Rs.)', M.DocTotal as 'Invoice Total (Rs.)'
From INV1 L Inner JOIN INV4 T on T.DocEntry=L.DocEntry
Inner JOIN OINV M on M.DocEntry=L.DocEntry
WHERE L.DocDate BETWEEN '[%0]' AND '[%1]' AND L.Excisable='Y'
GROUP BY L.DocDate,L.ItemCode,L.Dscription, L.DocEntry
ORDER BY L.DocDate,L.ItemCode,L.Dscription,L.DocEntry
Thanks