Looks like you want to push the Subtotal from Group A to Group B.
Then try this
Create formula, @subtotalCustomer, place it in Group A header
WhilePrintingRecords;
Shared Numbervar stotal = sum({invoice.amt},{customer.id});
Create formula @displaysubtotal and place it in Group B header
WhilePrintingRecords;
shared numbervar stotal;
stotal
Cheers,
-LW