File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Other Java Products and Servers and the fly likes Exporting Crystal reports to Excel Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Products » Other Java Products and Servers
Reply Bookmark "Exporting Crystal reports to Excel" Watch "Exporting Crystal reports to Excel" New topic
Author

Exporting Crystal reports to Excel

Chandra Mohan
Ranch Hand

Joined: Oct 06, 2003
Posts: 62
Hi,
I am facing a problem in exporting the crystal reports to an excel file. i am using CR11. It is saying that the exporterName is not defined. I added setName but with no effect. Any clue? Thanks in advance,

JPEReportSourceFactory jrsf = new JPEReportSourceFactory();
ExportOptions exOpts = new ExportOptions();
exOpts.setExportFormatType(ReportExportFormat.recordToMSExcel);
//ExcelExportFormatOptions options= new ExcelExportFormatOptions();
DataOnlyExcelExportFormatOptions options=new DataOnlyExcelExportFormatOptions();
options.setMaintainRelativeObjectPosition(true);
options.setExportImages(true);
options.setExportObjectFormatting(true);
options.setMaintainColumnAlignment(true);
options.setExportObjectFormatting(true);
options.setExportPageHeaderAndFooter(true);
options.setUseWorksheetFunctionsForSummaries(true);
options.setBaseAreaType(AreaSectionKind.detail);
exOpts.setFormatOptions(options);
ReportExportControl expViewer = new ReportExportControl();

expViewer.setName("Excel1.xls");
expViewer.setEnableParameterPrompt(true);
expViewer.setExportOptions(exOpts);


expViewer.setReportSource(jrsf.createReportSource("Report.rpt",request.getLocale()));
expViewer.setOwnPage(true);
expViewer.setOwnForm(true);
expViewer.processHttpRequest(request, response, config.getServletContext(),out);
expViewer.dispose();

--------------------

Thanks and Regards
Chandra Mohan


Thanks and Regards
Chandra Mohan
 
I agree. Here's the link: http://jrebel.com/download
 
subject: Exporting Crystal reports to Excel
 
Similar Threads
Please Help - This is Most Urgent
jsp crystal reports xls
Java & Crystal Reports
Tomcat is logging IllegalStateException whenever it invokes processHttpRequest()
error:exportername is empty