I have a formula @InitVars in the page header which includes the following, and similar lines:
shared numbervar runWaste:=0;
In Details v,
I have a vague memory that I'm now having a hard time substantiating about shared variables not passing back up from a subreport. Still looking; good thing it's Friday afternoon.
Edit: I can't find what I was looking for, so a general thought. Check evaluation time, and make sure that the later section on the main report is evaluating after the subreport (WhilePrintingRecords might be your friend here).