I have a report that selects Invoices and Credit notes for a particular range and shows zero for Credit notes for Invoices outside of the range (and visa versa). The problem is that where several credit notes exist for the same invoice in the same period, the invoice is duplicated and included in the totals. How can I show the duplicate as zero or exclude it from the totals?