Problem Embedding (Viewing) Crystal Reports in a JSP Page

Hi All,

I am trying to view a Crystal Report (CR10) in a JSP page using Web Logic and Crystal SDK but I keep getting the error below. I have been able to get the List of Reports on the Server but cannot view them. I am using is CrystalReportViewer class.

ERROR:

com.crystaldecisions.report.web.viewer.CrystalReportViewer

An error occurred at the server: The Page Server session you are using to connect is in the process of being shut down. Please retry.

CODE:

<%@ page import="

com.crystaldecisions.report.web.viewer.CrystalReportViewer,

com.crystaldecisions.sdk.occa.report.data.*,

com.crystaldecisions.sdk.occa.report.application.*,

com.crystaldecisions.report.web.viewer.*

"%>

<%@ page import = "com.crystaldecisions.sdk.framework.*"%>

<%@ page import="com.crystaldecisions.sdk.plugin.desktop.report.*,com.crystaldecisions.sdk.plugin.desktop.common.*"%>

<%@ page import=" com.crystaldecisions.report.web.viewer.ReportExportControl,

com.crystaldecisions.sdk.occa.report.data.*,

com.crystaldecisions.sdk.occa.report.exportoptions.*,

com.crystaldecisions.sdk.occa.managedreports.*,

com.crystaldecisions.sdk.occa.infostore.*

"%>

<%

// Create an Interactive Viewer

IEnterpriseSession es = (IEnterpriseSession) session.getAttribute("es");

IReportSourceFactory reportSourceFactory = (IReportSourceFactory) es.getService("PSReportFactory");

//com.crystaldecisions.sdk.occa.managedreports.ps.internal.IReportSourceFactory

Object reportSource = reportSourceFactory.openReportSource((IInfoObject)session.getAttribute("report"),Locale.ENGLISH);

CrystalReportViewer viewer = new CrystalReportViewer();

//viewer.setReportSourceClassFactoryName("com.crystaldecisions.sdk.occa.report.application.reportsourcefactory.PSReportSourceFactory");

// Set the name for the interactive viewer

viewer.setEnterpriseLogon(es);

viewer.setName("Crystal_Report_Viewer");

viewer.setOwnPage(true);

viewer.setOwnForm(true);

viewer.setHasRefreshButton(true);

viewer.setDisplayGroupTree(false);

viewer.setEnableParameterPrompt(true);

viewer.setDisplayGroupTree(true);

/* ParameterFields won't hold unless you use the viewer to set */

// Set the source for the interactive viewer to the client documents report source

viewer.setParameterFields(((Fields) session.getAttribute("parameterFields")));

viewer.setReportSource(reportSource);

// Process the http request to view the report

//viewer.setPrintMode(CrPrintMode.ACTIVEX);

//viewer.setPrintMode(CrPrintMode.PDF);

viewer.processHttpRequest(request, response, getServletConfig().getServletContext(), out);

// Dispose of the viewer object

viewer.dispose();

%>

[2913 byte] By [Umesh.kalaspurkara] at [2007-10-2 7:39:40]
# 1
Hi Umesh,my id is ship2moon@gmail.com. Send me a test mail and i will give you a word document to work with this issue.regards,Logu.
ship2moona at 2007-7-16 21:22:59 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 2
Hello,I'm having the same problem. Could you help me with this issue too.best regards.
jose_va at 2007-7-16 21:22:59 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...