I have multiple records on invoices. I need to extract a value from the first record on each invoice, then add it to the other records on that invoice, then re-sort the report on that value.

How do I do this?

My thought is to create a shared variable for the extracted value from the first record and add it to the other records on that invoice, then run a second pass that sorts on that value. However, I am not sure how to do this.