I am not sure I fully understand the question. If you are loading from a dataset, where is that dataset created? When I think of datasets I think of .Net datasets which could be my problems.
If you want to pass values between a subreport and main report the answer lies in setting the scope of the variable to shared. For example, keep in mind how the main report is generated first and the subreports in subsequent passes.
You can use these methods to control passing information to the subreport selection formulas as well.
Formula MainReport
shared numbervar x;
Formula subreport
shared numbervar x;
I hope something here will help.
Regards,
John W.