I am having a problem in a report.
When I attach a single attachment to a transaction the report works perfectly but when I attach 2 or more attachments it duplicates the tranaction and simlarly the totals are effected.
Can someone please guide me where the mistake is, I could not figue it out.
To eleborate this propblem I have attached the Snapshot of the report where the transaction # 4497 is duplicated.
The field name where attachments are attached is "purattach"
Following is the Query used for this report.
SELECT Pchase.PurCompanyName, Pchase.PurTransId, Pchase.[Purchase Date], Pchase.[Purchase Description], Pchase.[Party Challan #], Pchase.[Invoice #], Pchase.[Purchase Qty], Pchase.[Purchase Price], Pchase.[Purchase Units], Company.CoId, Pchase.[Pur Seller], ([Payment Made]+[Mobile Deduction]) AS Dbt, Pchase.[Amount Returned], [Purchase Remarks] & " " & [Stored At] & " " & [D2Party] & " " & [SB] & " " & [PPMTTYP] & " " & [TrNo] & " " & [Cheque PO #] & " " & [Podtd] & " " & [Ref] & " " & [PSQ] AS Rem, IIf([Amount Returned]=0,([Purqty]*[Purchase Price]+[GST Amount]),[Amount Returned]) AS PurCredit, Pchase.[Pur Varification], Pchase.[Cheque PO #], [Purchase Description] & " " & [Salery Month] AS Des, IIf([Supplier Bank]="Nil",Null,[Supplier Bank]) AS SB, IIf([Payment Type]="Nil",Null,[Payment Type]) AS PPMTTYP, IIf([Delivered To Party]="Nil",Null,[Delivered To Party]) AS D2Party, Pchase.purattach, Pchase.[Mobile Deduction], Pchase.[Payment Made], IIf(IsNull([purattach].[FileData])," ","Yes") AS Patt, Company.[NIC No], Voucher.VoucherNo, [Party Challan #] & " " & [VoucherNo] AS GPVOU, IIf([Truck #]="Nil"," ",[Truck #]) AS TrNo, Company.CoAttach, Company.NICcopyFront, Company.NICcopyBack, Pchase.[GST Rate], Pchase.[GST Amount], Pchase.[Total Amount], Pchase.GSTR, Pchase.Purqty, Pchase.[Purchase Cash Qty], Pchase.[Purchase Sales Tax], IIf(IsNull([purattach].[FileData])," ","@") AS ACatt, [Purchase Remarks] & " " & [Ref] AS ACattRem, Company.Mobile, Pchase.PurDate, IIf([Cheque PO #]>0,[Chq PO Date]," ") AS Podtd, Pchase.[EntryPLogin By], IIf([EntryPLogin By]="Aamer Sheikh","AAS",[EntryPLogin By]) AS TransBy, Pchase.[SupervisePLogin By], Company.ComapnyName, Company.EmployeeWorkLoc, Pchase.[Delivered To Party], Pchase.PPrb
FROM (Company INNER JOIN Pchase ON Company.ComapnyName = Pchase.PurCompanyName) LEFT JOIN Voucher ON Pchase.PurTransId = Voucher.[Vou ID]
ORDER BY Pchase.PurTransId, Pchase.[Purchase Date];
Your help is needed to solve this issue