Hmmm, not sure I understand all of your data but here is a try...
Is there a condition (or conditions) per row (not comparing to next or previous row) that lets you know if that PO should be collapsed and summed or if it should be left seperate and amount displayed altered?
Like a Field is NULL for one and not the other condition, or something similar?
If so you can create a formula field to use a text version of the PO field if it = collapse and if it is not collapse then the PO text field + "-" + another unique column field from that PO group.
If you group on that it will COllapse where you only use the PO and keep seperate the others.
You also will need to suppress your details and group footer.
Use another formual on the same condition to display the amount:
If collapsed then Use ethe SUM (received_amount, group1) else use amonut * quatity for that row (group).
Does this make any sense?