Sorry, no. They aren't like the modules or sections of some computer languages. A subreport is an independent report that makes its own request to the server for data.
You can used a Shared Variable to pass a value back to the main report. This can then be passed to another subreport in a lower section.
I assume you don't know Shared Variables, so here's how to use them:
To pass data back from a subreport, use a shared variable. For a date, put a formula field in the subreport like
Code:
Shared dateVar
V_Today := {LoadStatus.LastDLoad}
To access it in the main report, create another formula field with
Code:
Shared dateVar
V_Today := V_Today
If it was a currency value, you'd do it differently, e.g.
Code:
whileprintingrecords;
shared currencyvar SumSaved;
SumSaved:={#TotSaved};
SumSaved
And to access it in the main report, create another formula field with
Code:
whileprintingrecords;
shared currencyvar SumSaved;
SumSaved
Note that the shared variable is only available in the section after the section which contains the subreport.
![[yinyang] [yinyang] [yinyang]](/data/assets/smilies/yinyang.gif)
Madawc Williams (East Anglia, UK). Using Windows XP & Crystal 10
![[yinyang] [yinyang] [yinyang]](/data/assets/smilies/yinyang.gif)