Jump to content
We've recently updated our Privacy Statement, available here ×

giliardi

Members
  • Posts

    1
  • Joined

  • Last visited

 Content Type 

Profiles

Forum

Events

Featured Visualizations

Knowledge Base

Documentation (PDF Downloads)

Blog

Documentation (Test Area)

Documentation

Dr. Jaspersoft Webinar Series

Security Advisories

Downloads

Everything posted by giliardi

  1. Hello all, I was using the IReport and JasperReports libs 3.0.0. I created a simple report (page header, detail, page footer and summary bands) and I export to various formats with IReport tool sucessfully. I put the .jasper file on my webapp (JasperReports libs 3.0.0, POI 3.0.1) and I export to PDF, RTF and CSV, but I can't export to XLS (that`s the most important format to my app). Doing a debug on application servlet that generate this report I verify that error occours at last command on the code: The execution breaks when debug pass on exportReport(); command. With another formats this command is executed successfully, except with XLS format. The breaks don't throw exceptions :( Anyone can help me? Code: JasperPrint print = JasperFillManager.fillReport(fis, parameters, ds); ByteArrayOutputStream out = new ByteArrayOutputStream(); JRExporter exporter = null; if (ftype == null || ftype.equals("pdf")) { exporter = new JRPdfExporter(); exporter.setParameter(JRExporterParameter.JASPER_PRINT, print); exporter.setParameter(JRExporterParameter.OUTPUT_STREAM, out); response.setHeader("Content-Disposition", "attachment; filename=""+reportName+".pdf""); response.setContentType("application/pdf"); } else if (ftype != null && ftype.equals("xls")) { exporter = new JRXlsExporter(); exporter.setParameter(JRExporterParameter.JASPER_PRINT, print); exporter.setParameter(JRExporterParameter.OUTPUT_STREAM, out); exporter.setParameter(JRXlsExporterParameter.IS_ONE_PAGE_PER_SHEET, Boolean.FALSE); exporter.setParameter(JRXlsExporterParameter.IS_AUTO_DETECT_CELL_TYPE, Boolean.TRUE); exporter.setParameter(JRXlsExporterParameter.IS_WHITE_PAGE_BACKGROUND, Boolean.TRUE); exporter.setParameter(JRXlsExporterParameter.IS_REMOVE_EMPTY_SPACE_BETWEEN_ROWS, Boolean.FALSE); response.setHeader("Content-Disposition", "attachment; filename=""+reportName+".xls""); response.setContentType("application/ms-excel"); }..... exporter.exportReport(); <<<<<<================ ...
×
×
  • Create New...