the report jsp is Hi,
I have installed the following s/w.
Crystal report 2011
eclipse for crystal report
tomcat 5.5
jdk 1.6
And followed the steps mentioned in the blog
scn.sap.com/DOCS/doc-31248
But unable to see the report in internet explorere.The error that is coming is
org.apache.jasper.JasperException: Unable to compile class for JSP:
An error occurred at line: 6 in the generated java file
Only a type can be imported. com.crystaldecisions.report.web.viewer.CrystalReportViewer resolves to a package
An error occurred at line: 7 in the generated java file
Only a type can be imported. com.crystaldecisions.sdk.occa.report.application.OpenReportOptions resolves to a package
An error occurred at line: 8 in the generated java file
Only a type can be imported. com.crystaldecisions.sdk.occa.report.application.ReportClientDocument resolves to a package
An error occurred at line: 9 in the generated java file
Only a type can be imported. com.crystaldecisions.sdk.occa.report.lib.ReportSDKExceptionBase resolves to a package
An error occurred at line: 12 in the jsp file: /Report3-viewer.jsp
ReportClientDocument cannot be resolved to a type
9: try {
10:
11: String reportName = "WEB-INF/Report3.rpt";
12: ReportClientDocument clientDoc = (ReportClientDocument) session.getAttribute(reportName);
13:
14: if (clientDoc == null) {
15: // Report can be opened from the relative location specified in the CRConfig.xml, or the report location
An error occurred at line: 12 in the jsp file: /Report3-viewer.jsp
ReportClientDocument cannot be resolved to a type
9: try {
10:
11: String reportName = "WEB-INF/Report3.rpt";
12: ReportClientDocument clientDoc = (ReportClientDocument) session.getAttribute(reportName);
13:
14: if (clientDoc == null) {
15: // Report can be opened from the relative location specified in the CRConfig.xml, or the report location
An error occurred at line: 19 in the jsp file: /Report3-viewer.jsp
ReportClientDocument cannot be resolved to a type
16: // tag can be removed to open the reports as Java resources or using an absolute path
17: // (absolute path not recommended for Web applications).
18:
19: clientDoc = new ReportClientDocument();
20: clientDoc.setReportAppServer(ReportClientDocument.inprocConnectionString);
21:
22: // Open report
An error occurred at line: 20 in the jsp file: /Report3-viewer.jsp
ReportClientDocument.inprocConnectionString cannot be resolved to a type
17: // (absolute path not recommended for Web applications).
18:
19: clientDoc = new ReportClientDocument();
20: clientDoc.setReportAppServer(ReportClientDocument.inprocConnectionString);
21:
22: // Open report
23: clientDoc.open(reportName, OpenReportOptions._openAsReadOnly);
An error occurred at line: 23 in the jsp file: /Report3-viewer.jsp
OpenReportOptions._openAsReadOnly cannot be resolved to a type
20: clientDoc.setReportAppServer(ReportClientDocument.inprocConnectionString);
21:
22: // Open report
23: clientDoc.open(reportName, OpenReportOptions._openAsReadOnly);
24:
25:
26: // Store the report document in session
An error occurred at line: 35 in the jsp file: /Report3-viewer.jsp
CrystalReportViewer cannot be resolved to a type
32: // ****** BEGIN CONNECT CRYSTALREPORTPAGEVIEWER SNIPPET ****************
33: {
34: // Create the CrystalReportViewer object
35: CrystalReportViewer crystalReportPageViewer = new CrystalReportViewer();
36:
37: String reportSourceSessionKey = reportName+"ReportSource";
38: Object reportSource = session.getAttribute(reportSourceSessionKey);
An error occurred at line: 35 in the jsp file: /Report3-viewer.jsp
CrystalReportViewer cannot be resolved to a type
32: // ****** BEGIN CONNECT CRYSTALREPORTPAGEVIEWER SNIPPET ****************
33: {
34: // Create the CrystalReportViewer object
35: CrystalReportViewer crystalReportPageViewer = new CrystalReportViewer();
36:
37: String reportSourceSessionKey = reportName+"ReportSource";
38: Object reportSource = session.getAttribute(reportSourceSessionKey);
An error occurred at line: 57 in the jsp file: /Report3-viewer.jsp
ReportSDKExceptionBase cannot be resolved to a type
54: // ****** END CONNECT CRYSTALREPORTPAGEVIEWER SNIPPET ****************
55:
56:
57: } catch (ReportSDKExceptionBase e) {
58: out.println(e);
59: }
60:
Stacktrace:
org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:92)
org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:330)
org.apache.jasper.compiler.JDTCompiler.generateClass(JDTCompiler.java:443)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:356)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:334)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:321)
org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:592)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:328)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:313)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:260)
javax.servlet.http.HttpServlet.service(HttpServlet.java:723)
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
The jsp page that generated is
<%@ page contentType="text/html; charset=UTF-8" pageEncoding="ISO-8859-1" %><%@ page import="com.crystaldecisions.report.web.viewer.CrystalReportViewer,
com.crystaldecisions.sdk.occa.report.application.OpenReportOptions,
com.crystaldecisions.sdk.occa.report.application.ReportClientDocument,
com.crystaldecisions.sdk.occa.report.lib.ReportSDKExceptionBase" %><%
// This sample code calls methods from the CRJavaHelper class, which
// contains examples of how to use the BusinessObjects APIs. You are free to
// modify and distribute the source code contained in the CRJavaHelper class.
try {
String reportName = "WEB-INF/Report3.rpt";
ReportClientDocument clientDoc = (ReportClientDocument) session.getAttribute(reportName);
if (clientDoc == null) {
// Report can be opened from the relative location specified in the CRConfig.xml, or the report location
// tag can be removed to open the reports as Java resources or using an absolute path
// (absolute path not recommended for Web applications).
clientDoc = new ReportClientDocument();
clientDoc.setReportAppServer(ReportClientDocument.inprocConnectionString);
// Open report
clientDoc.open(reportName, OpenReportOptions._openAsReadOnly);
// Store the report document in session
session.setAttribute(reportName, clientDoc);
}
// ****** BEGIN CONNECT CRYSTALREPORTPAGEVIEWER SNIPPET ****************
{
// Create the CrystalReportViewer object
CrystalReportViewer crystalReportPageViewer = new CrystalReportViewer();
String reportSourceSessionKey = reportName+"ReportSource";
Object reportSource = session.getAttribute(reportSourceSessionKey);
if (reportSource == null)
{
reportSource = clientDoc.getReportSource();
session.setAttribute(reportSourceSessionKey, reportSource);
}
// set the reportsource property of the viewer
crystalReportPageViewer.setReportSource(reportSource);
// Apply the viewer preference attributes
// Process the report
crystalReportPageViewer.processHttpRequest(request, response, application, null);
}
// ****** END CONNECT CRYSTALREPORTPAGEVIEWER SNIPPET ****************
} catch (ReportSDKExceptionBase e) {
out.println(e);
}
%>
Thanks in advance
Debabrata