if you can use a stored proc that would be one way.
if you want to write a command that would be another.
For a crystal solution you can group on the purchase order number
set a min and max summary of the purchase type on that group and use that as a group select criteria
e.g.
minimum(type,PO#)= 1 and maximum(type,PO#)=2