Sorry, now I think I am getting confused.
INside teh sub report you can place the set up the shared variable anwhere you need to to get it to give you the correct values.
I thought you had the sub report set up to run in a footer in main report...
where is the sub report set to run in the main report. If you want this to get you values 'for each name' then I think you want your main report grouped on the 'name' field and the sub report to link on the 'name' field and the sub report to be placed in the 'name' group header.
If you only run the Sub report once for the entire main report it will only get the shared variable value once. I thnk this is where you are not seeing it 'reset' itself per name.