Creating a Java Reporting Component report source only requires you to have the location of the report you wish to view or export. The report location can be specified using a file system path, UNC address, or URL. For more information on the Java Reporting Component report source and specifying paths, see Java Reporting Component. Also, for the Java Reporting Component to correctly retrieve data for a report, the report's data sources must be correctly specified through JNDI. For more information on data source configuration, see Configuring data sources.
<%@ page import="com.crystaldecisions.reports.reportengineinterface.JPEReportSourceFactory,
com.crystaldecisions.sdk.occa.report.reportsource.IReportSourceFactory2,
com.crystaldecisions.reports.reportengineinterface.IReportSource"
IReportSourceFactory2 rptSrcFactory = new JPEReportSourceFactory();
The IReportSource object can now be used by the viewer or export control.
String report = "/reports/sample.rpt";
IReportSource reportSource = (IReportSource) rptSrcFactory.createReportSource(report, request.getLocale());
| Crystal Decisions http://www.crystaldecisions.com/ Support services http://support.crystaldecisions.com/ |