简体   繁体   中英

Birt not generating PDF and XLS report

I'm using Birt 4.4 and my html report works fine but xls and pdf files throw The output format is not supported error

org.eclipse.birt.report.engine.api.EngineException: The output format xsl is not supported. 
     at org.eclipse.birt.report.engine.api.impl.EngineTask.setupRenderOption(EngineTask.java:2031)
     at org.eclipse.birt.report.engine.api.impl.RunAndRenderTask.doRun(RunAndRenderTask.java:96)

I tried setting output format to xls_spudsoft and emitterID but no luck

Here is the code

EXCELRenderOption xlsOptions = new EXCELRenderOption(options);
xlsOptions.setEmitterID("uk.co.spudsoft.birt.emitters.excel.XlsEmitter");
xlsOptions.setOutputFormat("xls_spudsoft");

response.setHeader("Content-Disposition", "attachment; filename=\"" + reportName + "\"");
xlsOptions.setOutputStream(response.getOutputStream());

any ideas?

Thank you

Found what was the problem, in case someone wants to know how to fix this. Specify emitter for pdf report pdfOptions.setEmitterID(RenderOption.OUTPUT_EMITTERID_PDF) and for xls it was missing uk.co.spudsoft.birt.emitters.excel from classpath

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM