I have a report that does not calculate well.
The variable TOTAL_IMPORTE represents the sum of ah_facturas.importe which is placed inside a databand.


The variable is in two places of the report but the calculations show them wrong when there is only one line left on the next page.



The last row should not be added. What I do wrong?
Thanks in advance.