Help with Purchase Orders and last cost, last date report

, ,

I may be making this too complicated but I’m having an issue coming up with a BAQ or SQL to get the following in a report from POHead and PODetail

Part
Part Class
Last Vendor
Last PO #
Last Date (from POHead)
Last Cost

It needs to be grouped by part, show the last vendor purchased, Last PO number, Last date of the PO and the Last Cost of the PO. Does anyone have the best route to get this? I’ve tried a few subqueries but end up with parts duplicated because of multiple costs.

Any ideas would be appreciated.

Do you mean last PO written or last PO received?

Check out Purchase Advisor. This may have everything you need in it.

and even this can go sideways in a hurry… if you have a long-term PO with one vendor at one price and an “immediate need” PO with another vendor at another price…

Last PO written.

It does. But the users want it in an excel report.