JSP Calling Crystal Report Having Stored Procedure
843840Jun 23 2009 — edited Jun 25 2009Hi i am calling a crystal report from jsp where the crystal report is designed using stored procedure but the report does not get displayed and shows errors
my jsp file is
Code:
<%@ page import="com.crystaldecisions.report.web.viewer.*" %>
<%@ page import="com.crystaldecisions.sdk.occa.report.data.*" %>
<%@ page import="com.crystaldecisions.reports.sdk.ReportClientDocument" %>
<%@ page import = "java.util.*" %>
<%
try{
Object reportSource = session.getAttribute("reportSource");
if (reportSource == null)
{
String report = "Report4.rpt";
ReportClientDocument reportClientDoc = new ReportClientDocument();
reportClientDoc.open(report, 0);
reportSource = reportClientDoc.getReportSource();
session.setAttribute("reportSource", reportSource);
}
CrystalReportViewer viewer = new CrystalReportViewer();
viewer.setReportSource(reportSource);
viewer.setEnableParameterPrompt(false);
if (session.getAttribute("refreshed") == null)
{
viewer.refresh();
session.setAttribute("refreshed", "true");
}
viewer.setOwnPage(true);
viewer.processHttpRequest(request, response, getServletConfig().getServletContext(), null);
}
catch(Exception e)
{
e.printStackTrace();
}
%>
error:
com.crystaldecisions.report.web.viewer.CrystalReportViewer
Unexpected Query Engine error
the Report4.jsp connects to the database using oracle Native connection. the Report runs perfectly well when i open it directly from crystal report viewer.
Please help me out to solve this issue