We have a custom report based on the Invoices form where data needs to be picked to the report footer to show a summary of the line items. The Inventory ID field has an Attribute called HSCODE in the Inventory Form (there are 4-5 fixed HSCODES)
Based on this information if the line items of the invoices have the same HSCODE for different inventory items, we should cumulate their totals, but if the separate lines have different UOMs we should show that as well. What would be the best approach to achieve this result? The expected result would be something like this in the footer section.