Give this a try and see if it solves your problem:
1. Create a report variable called rnTotal, set the calculation to SUM, and reset it at the Data Group on Invoice Number.
2. Create a report variable called rlPrintTotal, set it to .f.
3. In the OnExit Expression of the Data Group Footer, use the following expression: _VFP.SetVar(rlPrintTotal, .t.)
4. In the Page Footer, use rnTotal for printing the Total. Set the Print When logic to: rlPrintTotal
I hope this helps,
Cathy