Hi,
I have a formula that I'm using in a group header, (customer number) to basically get the correct sum of a group of invoices. This is formula:
if Count ({invoices.invoice_number}, {invoices.invoice_number}) >= 2 then
Sum ({invoices.amount_open}, {@Customer}) / Count ({invoices.invoice_number}, {invoices.invoice_number}) else
Sum ({invoices.amount_open}, {@Customer})
I'm doing this because I can have duplicate, or more invoice numbers creating two or more lines of detail, and I only want to add the invoice amount once. I've basically grouped on the invoice number and copied the fields into to group header.
My grouping is like so:
G4 - Invoice number
G3 - Customer
G2 - Dept
G1 - Branch
My question is, how do I insert this formula into the next level, dept, so that I get correct 'sums' on the invoice amount for the dept group? It won't let me add my formula field, GF3AmountOpen because its summarised.
It coming out with some wonderful figures, but thats because of the duplicate lines for the invoice!!
Any help would be appreciated!
Thanks
Di
I have a formula that I'm using in a group header, (customer number) to basically get the correct sum of a group of invoices. This is formula:
if Count ({invoices.invoice_number}, {invoices.invoice_number}) >= 2 then
Sum ({invoices.amount_open}, {@Customer}) / Count ({invoices.invoice_number}, {invoices.invoice_number}) else
Sum ({invoices.amount_open}, {@Customer})
I'm doing this because I can have duplicate, or more invoice numbers creating two or more lines of detail, and I only want to add the invoice amount once. I've basically grouped on the invoice number and copied the fields into to group header.
My grouping is like so:
G4 - Invoice number
G3 - Customer
G2 - Dept
G1 - Branch
My question is, how do I insert this formula into the next level, dept, so that I get correct 'sums' on the invoice amount for the dept group? It won't let me add my formula field, GF3AmountOpen because its summarised.
It coming out with some wonderful figures, but thats because of the duplicate lines for the invoice!!
Any help would be appreciated!
Thanks
Di