Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Transfer a parameter from report to subreport 1

Status
Not open for further replies.

ipm

Programmer
Apr 5, 2005
16
DE
Is it possible to transfer a parameter or any othe data from report to subreport?
 
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.

-LB
 
How to use these 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.

[yinyang] Madawc Williams (East Anglia, UK) [yinyang]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top