Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Duplicative Values summed up in Report, but not shown

Status
Not open for further replies.

murali2611

Technical User
Jun 18, 2008
7
GB
I have created a REPORT that matches a Purchase Order with an invoice.

The subreport gives totals for each supplier for purchase orders and for invoices.

A purchase order can be matched with more than 1 invoice.
I get the problem when there are more than 1 invoice to be matched to the purchase order.



The purchase order will appear twice in the report if there are 2 invoices for a purchase order.



SELECT DISTINCT PurchaseOrders.PONumber, PurchaseOrders.SPCode, PurchaseOrders.Date, PurchaseOrders.Net, SuppInvoices.SuppID, SuppInvoices.[Inv No], SuppInvoices.Date, Sum(SuppInvoices.Net) AS [Sum Of SuppInvoices_Net]
FROM Quotations INNER JOIN (PurchaseOrders LEFT JOIN SuppInvoices ON PurchaseOrders.PONumber = SuppInvoices.POnumber) ON Quotations.ProjectID = PurchaseOrders.PRCode
WHERE (((PurchaseOrders.PRCode)=[Forms].[ProjectReports].[projcode].[Value]))
GROUP BY PurchaseOrders.PONumber, PurchaseOrders.SPCode, PurchaseOrders.Date, PurchaseOrders.Net, SuppInvoices.SuppID, SuppInvoices.[Inv No], SuppInvoices.Date, Quotations.SalesNet, SuppInvoices.POnumber;

 
Can someone help me ?

I need the Purchase order to appear just once, even if there are 2 invoices that make up for that purchase order.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top