Hi,
Try this:
SELECT T0.[DocNum], T0.[DocDate], T0.[CardCode],T2.Father, T1.[Dscription],T1.[Quantity],T1.[LineTotal] FROM ORDR T0 INNER JOIN RDR1 T1 ON T0.DocEntry = T1.DocEntry INNER JOIN ITT1 T2 ON T1.[ItemCode]=T2.[Code] INNER JOIN OITT T3 ON T2.Father = T3.Code WHERE T3.[TreeType] ='T' and T3.[Code] = [%4] and T0.[DocDate] between [%0] and [%1] GROUP BY T0.[DocNum], T0.[DocDate], T0.[CardCode],T1.[Quantity],T1.[LineTotal],T2.Father, T1.[Dscription]
Thanks & Regards,
Nagarajan