You might trying placing the subreports in different detail sections, assuming your design will let you. Unless you need the shared variables before the subreports run.,I would not put them in the header. I would put them in the subreports and then pass the value to the footer by placing the shared variable at that location.
This may help with problems caused by the way CR generates reports in the various passes it makes.
The obvious other points are to use the WhilePrintingRecords in the formulas and to make sure you have them variables reseting if there are multi page reports.
Hope something here will be helpful or get you to a right solution.
Regards,
John W.