>scan > ? AreaCode, Team, TeamCount, Percentage,,number of record befor multiple 4, NumToFetch , >report form rpt1 preview > >>
local lnArea, lnTeamCount, lnPercentage, lnNumToFetchNoMultiply, lnNumToFetch lnAreaCode = AreaCode lnTeam = Team etc. * E.g. do first assignation before the loop scan if curPercentage.AreaCode<>lnAreaCode && we're changing areas now * Print your information - will print from the prev record, as we want ? lnAreaCode, lnTeam, ln TeamCount, lnPercentage, lnNumToFetchNoMultiply, lnNumToFetch report form ... lnAreaCode = curPercentage.AreaCode && re-assign this temp variable to a new value endif * now re-assign all other vars, e.g. Team, Percentage, etc. * continue with the rest of your code report form rpt1 preview endscan