Using Variables to Pass Data Between Reports

The examples up to this point in the chapter that involve passing data between a main report and a Subreport have worked exclusively through the Subreport Linking tab or dialog. Although the functionality provided there is certainly powerful, circumstances might require more flexible passing of data between the main report and the Subreport or the passing of data the other way—from a Subreport to a main report.

With the use of variables, it becomes possible to pass data between the main report and any of the Subreports or even among different Subreports in the same main report. By declaring the same shared variable in formulas in both the main report and at least one Subreport, data can be exchanged ...

Get Special Edition Using® Crystal Reports® 10 now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.