Example Use Case:
An invoice is going to be generated from the Opportunity object, and it will include the OpportunityLineItems, however, we’d like to show sets of opportunity line items in the invoice; something like the following:
2) If by chance you are merging invoice from a record that has no values to merge and you do not want the table or title of table to be visible then you need a conditional section around each table and some field you can use for that conditional merge section. Then you can create rollup fields on the Opportunity to provide a count for each product category. Then create a formula/checkbox field to be TRUE if the rollup field is greater than 0. And use that field as the condition for the conditional section.