I believe you will need to create shared variables in the main report prior to the subreport, pass the desired values to them in the subreport, and then display the shared variables in the main report. So far as I know shared variables are the only way to pass data between main and subreports. Also, shared variables can only be used WhilePrintingRecords, example:
Formula in Main report:
WhilePrintingRecords ;
Shared CurrencyVar MyVariable := 0 ; // inialized to 0
Formula in Subreport:
WhilePrintingRecords ;
Shared CurrencyVar MyVariable := DataToDispayInMainReport ; // Set to value in subreport
Formula in Main report:
WhilePrintingRecords ;
Shared CurrencyVar MyVariable ;
MyVariable ; // Display value in main report
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.