0

Hi can any help me how to call a Crystal report 10 in JSP?
Please provide me sample codings if you have.
Thanks in advance

3
Contributors
2
Replies
3
Views
9 Years
Discussion Span
Last Post by itanmoy
0

1ST PUT ALL CLASS FILE IN YOUR WEB-INF

ITS THE SAMPLE

<%@ page import= "com.crystaldecisions.report.web.viewer.*,
com.crystaldecisions.sdk.occa.report.data.*" %>
<%@ page import="com.crystaldecisions.reports.reportengineinterface.JPEReportSourceFactory"%>
<%@ page import="com.crystaldecisions.sdk.occa.report.lib.ReportSDKException"%>
<%@ page import="com.crystaldecisions.sdk.occa.report.reportsource.IReportSource"%>
<%@ page import="com.crystaldecisions.sdk.occa.report.reportsource.IReportSourceFactory2"%>

<%
String report = "report.rpt";
IReportSourceFactory2 rptSrcFactory = new JPEReportSourceFactory();
IReportSource reportSource = (IReportSource) rptSrcFactory.createReportSource(report, request.getLocale());

CrystalReportViewer viewer = new CrystalReportViewer();
viewer.setReportSource(reportSource);
viewer.refresh();
viewer.processHttpRequest(request, response, getServletConfig().getServletContext(), out);
viewer.dispose();
%>

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.