![](http://content.invisioncic.com/i328763/set_resources_3/84c1e40ea0e759e3f1505eb1788ddf3c_pattern.png)
milli
-
Posts
5 -
Joined
-
Last visited
Content Type
Forum
Downloads
Featured Visualizations
Knowledge Base
Documentation (PDF Downloads)
Blog
Documentation (Test Area)
Documentation
Dr. Jaspersoft Webinar Series
Security Advisories
Events
Profiles
Posts posted by milli
-
-
Thank you for your suggestion.
I've managed to make all function with the output in html and pdf and also in excel using the poi libraries.
But I'd like to use the JExcel libraries, I suppose they uses less memory.
Here is my code:
JExcelApiExporter exporter = new JExcelApiExporter();
ByteArrayOutputStream xlsReport = new ByteArrayOutputStream();
exporter.setParameter( net.sf.jasperreports.engine.JRExporterParameter.JASPER_PRINT,
jasperPrint);
exporter.setParameter(JExcelApiExporterParameter.IS_DETECT_CELL_TYPE,Boolean.TRUE);
exporter.setParameter(JExcelApiExporterParameter.IS_REMOVE_EMPTY_SPACE_BETWEEN_ROWS,Boolean.TRUE) ;
exporter.setParameter(JExcelApiExporterParameter.IS_WHITE_PAGE_BACKGROUND,Boolean.TRUE);
exporter.setParameter(JExcelApiExporterParameter.IS_ONE_PAGE_PER_SHEET,
Boolean.TRUE);
exporter.setParameter( net.sf.jasperreports.engine.JRExporterParameter.OUTPUT_STREAM,xlsReport);
exporter.exportReport();
byte[] bytes = xlsReport.toByteArray();
resp.setContentType("application/vnd.ms-excel");
resp.setContentLength(bytes.length);
resp.setHeader("Content-disposition", "attachment; filename=""
+ filename + ".xls"");
ServletOutputStream ouputStream = resp.getOutputStream();
ouputStream.write(bytes, 0, bytes.length);
ouputStream.flush();
ouputStream.close();
context.responseComplete();
Have I made something wrong?
Thank you again for any help.
-
Hi,
I use java server faces I have this error with JExcel:
javax.faces.el.EvaluationException: java.lang.IllegalAccessError: jxl/write/biff/WritableFontRecord.setStruckout(Z)V
I don't use images in my report.
Any idea?
Thank you.
-
Thank you for your suggestions, I've set the parameters.
But I've still problem only for big reports and only for html and excel, how many records can jasperreport output?
I'm using JRBeanCollectionDatasource.
Thank you again.
-
Hi, I've experienced the same problem using the virtualizer.
In debug mode I've seen that the JasperPrint object is generated without errors, the problem (out of memory error) occurs in the exportReport() method on JRHtmlExporter object.
Another strange thing is that I've got the error only when I use JRHtmlExporter or JRXlsExporter and not generating pdf.
Someone could help?
Thank you
jexcel error
in Products
Posted
I'm using jxl-2.6.4.jar. I don't know if I need other libraries to use JExcel.
Thank you.