as long as all the criteria for grouping is in the table and does not need to be modified, you can create a formula that satisfies your requirements.
ie, you can't use sum or avg
Looking at the sample, I am not sure that this can be done in CR.
WHY?
Basically, CR scans the data and by just looking the data determines which group it belongs to.
This can't be done in the above example, if it was look at the last digit of the bill number, then it could do it, but is 11 away from the previous...well maybe, but reset to 0 if 7, no...
HTH
good luck