So you want to run the report in it's entirety to get all shred variables, and then use them as a parameter for running the report?
See, more proof, crack and coding don't mix
Why not state the real requirements instead of stating architecture that we ust try to live within?
What does this shared variable contain, and why is it that the driving report is the subreport?
Sounds to me like the subreport should be the main report, with a parmaeter based on whatever value you're placing in the shared variable, and the parameter being used to filter the rows in the record selection.
In general subreports area bad idea and if they link or intend to filter something, should be avoided.
Consider in lieu of a subreport, use Add Command listed under your data source and place real SQL within.
-k
-k