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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Subreport Shared Values-Crystal Reports 8.5

Status
Not open for further replies.

AITF

Technical User
Mar 26, 2008
4
US
I am attempting to write a rpt that passes values derived from a formula. I would like to share this value with multiple reports. I'm having difficulty writing the syntax that will enable me to accomplish this. The report is based upon a history table where I am extracting values from change points during the history. My calculation must reference the same record throughout each report in order for the calculation to work.

Any suggestions? HELP!!!

Also, after sharing this value between reports, I would need to group, total, display in cross tab and chart.

Yeah, I know...I'm asking too much.
 
You can do it with a number of subreports in a 'frame' report. 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.

You can pass the details to another subreport using Edit > Subreport Links.

Another alternative is to export report output as a text file or Excel spreadsheet. This can then be used as input to another Crystal. I think this worked in 8.5, which is what I started with.

[yinyang] Madawc Williams (East Anglia, UK). Using Windows XP & Crystal 10 [yinyang]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top