• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Devaka Cooray
  • Tim Cooke
Sheriffs:
  • Rob Spoor
  • Liutauras Vilda
  • paul wheaton
Saloon Keepers:
  • Tim Holloway
  • Tim Moores
  • Mikalai Zaikin
  • Carey Brown
  • Piet Souris
Bartenders:
  • Stephan van Hulst

Exporting Crystal reports to Excel

 
Ranch Hand
Posts: 63
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
It wasn't my idea to go to some crazy nightclub in the middle of nowhere. I just wanted to stay home and cuddle with this tiny ad:
Smokeless wood heat with a rocket mass heater
https://woodheat.net
reply
    Bookmark Topic Watch Topic
  • New Topic