You can link parameters that are created in the main and subreports, or you can link fields in the subreport with parameters in the main report. If you need to pass data from main to subreport or from subreport to main, you need to use shared variables.
To pass data back from a subreport, use a shared variable. For a datam satm nake a formula field in the subreport like
Shared dateVar
V_Today := {LoadStatus.LastDLoad}
To access it in the main report, create another formula field with
Shared dateVar
V_Today := V_Today
If it was a currency value, you'd do it differently, e.g.
whileprintingrecords;
shared currencyvar SumSaved;
SumSaved:={#TotSaved};
SumSaved
And to access it in the main report, create another formula field with
whileprintingrecords;
shared currencyvar SumSaved;
SumSaved
Note that the shared variable is only available in the section after the section which contains the subreport.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.