since you want a sum of the commission, life is pretty simple.
add a variable into the formula...well here something like:
shared numbervar totCom;
local numbervar thisCom;
/ This tests the number of chits per day for a class in indoor fitness and claculates the commission
// sorts indoor fitness sales items
if {tblPOSItems.POSItemCode} startswith "N" then
//counts chits and determines if chits are less than or equal to 5
(if count({tblPOSChits_ItemDetails.POSChitDate},{tblPOSChits_ItemDetails.POSChitDate}) <= 5
// if true chit amount will be commission amount
then thisCom:={tblPOSChits_ItemDetails.GrossAmount}*1.0
// if chits are over 5 then commission will be only 70%
else thisCom:={tblPOSChits_ItemDetails.GrossAmount}*.7)
else thisCom:={tblPOSChits_ItemDetails.GrossAmount}*.7;
totCom:=totCom + thisCom;
thisCom
basically set the current commision to a variable, since CR displays the last value that it sees, you need the current commision at the bottom of the formula, the rest is a simple incrementing.
HTH