after the code to loop through the recordset you need to add code to reset the recordset to the first record.
place your cursor after the repeat region that display the recordset.
then go to the server behaviors panel, click the plus button and select webassist -> Dynamic Web Charts -> reset to First record