Hi Frends,
I have a very basic simple question.
I want to show crystal reports (exported in excel format)
using
JSP page on
tomcat with mysql as a database.
I downloaded crystal report 11 evaluation version but not crystal report server.
I wrote a jsp code to export the report in excel format.
but tomcat is showing no report but
ERROR: exporterName is empty
I am stuck in this.
I am attaching my jsp code for reference.
May be I am missing something very important.
<@ page import= "com.crystaldecisions.report.web.viewer.*,com.crystaldecisions.sdk.occa.report.data.*,
com.crystaldecisions.reports.reportengineinterface.JPEReportSourceFactory,
com.crystaldecisions.sdk.occa.report.reportsource.IReportSourceFactory2,
com.crystaldecisions.sdk.occa.report.exportoptions.ReportExportFormat,
com.crystaldecisions.sdk.occa.report.exportoptions.*,
com.crystaldecisions.report.web.ServerControl,
com.crystaldecisions.sdk.occa.report.reportsource.IReportSource"
%lt
String path = "/Report2.rpt";
IReportSourceFactory2 rsf = new JPEReportSourceFactory();
IReportSource rptSource = (IReportSource)rsf.createReportSource(path,
request.getLocale());
ConnectionInfos connInfos = new ConnectionInfos();
IConnectionInfo connInfo1 = new ConnectionInfo();
connInfo1.setUserName("root");
connInfo1.setPassword("ragini");
connInfos.add(connInfo1);
CrystalReportViewer viewer = new CrystalReportViewer();
viewer.setDatabaseLogonInfos(connInfos);
viewer.setReportSource(rptSource);
viewer.setEnableLogonPrompt(false);
viewer.setName("CrystalReportViewer");
ReportExportControl exportcontrol=new ReportExportControl();
ExportOptions oExportOptions = new ExportOptions();
oExportOptions.setExportFormatType(ReportExportFormat.MSExcel);
ExcelExportFormatOptions xlOpts = new ExcelExportFormatOptions();
oExportOptions.setFormatOptions(xlOpts);
exportcontrol.setReportSource(rptSource);
exportcontrol.setExportOptions(oExportOptions);
exportcontrol.setName("ReportExportCintrol");
exportcontrol.processHttpRequest(request, response, getServletConfig().getServletContext(),
out);
should I need to do some changes in server.xml of tomcat5.5
Should I need some another component of Crystal reports to serve the web based reports.
Please help me.