you can suppress the duplicate detail rows using
previous(table.invoiceno)=table.invoiceno and
previous(table.invoiceline)=table.invoiceline
or you can use the same logic to alter the display data to to a zero value.
you cannot use it to uinsert a fomrula field that will allow you to sum on.
you will have to get your values via shared variabl formulas or Running Totals
I pferer RTs.
here are 2 examples
name=qty
field to summarize=invoiced quantity
type=sum
evaluate=use a formula (you could also do this by extra hidden grouping if you want)
previous(table.invoiceno)<>table.invoiceno and
previous(table.invoiceline)<>table.invoiceline
reset= on change of group (invoiceno if you are grouping here) or never if this is the grand total for a report
place in group footer or report footer depending on above reset design answer.
name=amt
field to summarize=invoiced line amount
type=sum
evaluate=use a formula (you could also do this by extra hidden grouping if you want)
previous(table.invoiceno)<>table.invoiceno and
previous(table.invoiceline)<>table.invoiceline
reset= same as above