Caching a report source in the session variable allows it to be used multiple times efficiently. When a report source is not cached, the process of creating a new report source multiple times becomes fairly expensive. Furthermore, caching a report source allows reports with or without saved data to be refreshed.
The following example shows how to cache a report source in the session variable:
String report = "/reports/sample.rpt";
JPEReportSource reportSource;
reportSource = new JPEReportSource(report);
session.putValue("reportSource", reportSource);
Note: If you are using a cached report source, the dispose methods for the viewer or report source should not be called until the report source is no longer being used.
| Crystal Decisions http://www.crystaldecisions.com/ Support services http://support.crystaldecisions.com/ |