You can use shared variables to do this
you need one to set th valus to 0 in the group header
//header
shared numbervar counter;
shared numbervar amount;
counter := 0;
amount := 0;
you need another to do the row level calculation
//details
shared numbervar counter;
shared numbervar amount;
counter := counter + 1;
amount := if counter<11 then amount + {table.field} else amount;
then a third to display your final value in the group footer
//Footer
shared numbervar amount;
amount;