Hi ,
Try This ,
Select T0.Objtype,T0.Docentry,T0.Docnum,T0.Docdate,T0.Cardcode,T0.Cardname,T0.NumatCard,T0.Series,T1.Visorder,T1.Linenum, T1.Itemcode,T1.Dscription,T1.Quantity,T1.Price,T1.Taxcode,T0.TotalExpns,T0.Doctotal,T0.WTSum, (Select Taxsum from por4 Where DocEntry = T0.Docentry and LineNum = T1.Linenum and staType = 5) 'Service Tax', (Select Taxsum from por4 Where DocEntry = T0.Docentry and LineNum = T1.Linenum and staType = 6) 'Ces_ST', (Select Taxsum from por4 Where DocEntry = T0.Docentry and LineNum = T1.Linenum and staType = -10) 'HCess_ST' from opor T0 INNER JOIN por1 T1 ON T0.DocEntry = T1.Docentry
-Rajesh NS