I want to launch Crystal report using jsp
807603Jan 23 2008 — edited Jan 24 2008Hello All...
I try to launch Crystal reports from jsp.
i install crystal report and create one static report .
and then i put all jar files related to that in my lib folder..
which is in
webapps/ ApplicationName/WEB-INF/lib..
and write code to launch Crystal reports in jsp.
<%@page import="com.crystaldecisions.reports.sdk.ReportClientDocument,
com.crystaldecisions.sdk.occa.report.lib.*,
java.sql.*,javax.sql.*,javax.naming.*,
com.crystaldecisions.report.web.viewer.CrPrintMode,
com.crystaldecisions.report.web.viewer.CrystalReportViewer,
com.crystaldecisions.sdk.occa.report.data.ConnectionInfos,
com.crystaldecisions.sdk.occa.report.lib.ReportSDKExceptionBase"
%>
<%// open the report rpt file
String REPORT_NAME = "Report1.rpt";
ReportClientDocument reportClientDoc = new ReportClientDocument();
reportClientDoc.open(REPORT_NAME, 0);
// set up a viewer
CrystalReportViewer viewer = new CrystalReportViewer();
viewer.setOwnPage(true);
viewer.setOwnForm(true);
viewer.setPrintMode(CrPrintMode.ACTIVEX);
// pass it the report source
viewer.setReportSource(reportClientDoc.getReportSource());
//Render the report.
viewer.processHttpRequest(request, response, getServletConfig().getServletContext(), null);
%>
i get an error when i run application or that page
"ReportClientDocument cannot be resolved to a type"
please give me solution ..
Edited by: manojnikam on Jan 22, 2008 10:50 PM
Edited by: manojnikam on Jan 24, 2008 5:00 AM