ok, here is the general idea/logic that I would use. 1) have 5 variables, something like: abStart, abEnd, abLen, abStart2, abLen2. The first 3 track the 'first' consecutive absence, the last 2 start to track the next set of consecutive absences. When the values of the second are bigger than the first, replace them and update the first...that's the general idea of variables.
As to the logic...something like...when the student changes, set the startdates to an impossble date...say 1/1/2000. if the # of consecutive days =1, then it is the start of a new string of dates, check the first date flag, if it is 1/1/2000, update it to the current date. when you stop incrementing the consecutive counter, store the end Date. Next time you start the counter again, check if the dates, and increment the 1/1/2000 date. Start counting the number of days, if the consecutive count exceeds the prior string of absences, update the first set of variables (start date/length) and reset the 2nd set. In the group footer, you can now print the dates and length.
it's an overview, but hopefully it will give you an idea of how to proceed.
HTH