= MM_rsCount || MM_offset == -1) { // past end or move last
if (MM_rsCount % MM_size != 0) // last page not a full repeat region
MM_offset = MM_rsCount - MM_rsCount % MM_size;
else
MM_offset = MM_rsCount - MM_size;
}
}
//move the cursor to the selected record
int i;
for (i=0; @@rsName@@_hasData && (i < MM_offset || MM_offset == -1); i++) {
@@rsName@@_hasData = MM_rs.next();
}
if (!@@rsName@@_hasData) MM_offset = i; // set MM_offset to the last possible record
}
%>
]]>