<p>Hey guys,</p><p> </p><p>i want to render my Report to HTML Code and get the following exception:</p><p> </p><div>org.eclipse.birt.report.engine.api.UnsupportedFormatException: The output format HTML is not supported.</div><div>at org.eclipse.birt.report.engine.api.impl.EngineTask.setupRenderOption(EngineTask.java:2162) ~[org.eclipse.birt.report.engine_4.3.1.v201309161141.jar:na]</div><div>at org.eclipse.birt.report.engine.api.impl.RunAndRenderTask.doRun(RunAndRenderTask.java:97) ~[org.eclipse.birt.report.engine_4.3.1.v201309161141.jar:na]</div><div>at org.eclipse.birt.report.engine.api.impl.RunAndRenderTask.run(RunAndRenderTask.java:77) ~[org.eclipse.birt.report.engine_4.3.1.v201309161141.jar:na]</div><div> </div><div> </div><div>Here is my code:</div><div> </div><div><pre class="_prettyXprint _lang-">
@Override public final String getHTMLString() { ByteArrayOutputStream htmlOutputStream = new ByteArrayOutputStream(); HTMLRenderOption renderOptions = new HTMLRenderOption(); renderOptions.setOutputFormat(HTMLRenderOption.HTML); renderOptions.setOutputStream(htmlOutputStream); renderOptions.setOutputFileName(REPORT_OUTPUTFILE); try { this.runReport(renderOptions); } catch (Exception e) { getLogger().error(e.getMessage(), e); } return htmlOutputStream.toString(); }</pre></div><div> </div><div><pre class="_prettyXprint _lang-js"> private void runReport(final HTMLRenderOption renderOptions) { IReportEngine engine = null; EngineConfig config = null; IRunAndRenderTask task = null; try { config = new EngineConfig(); // no logging needed config.setLogConfig(null, Level.OFF); Platform.startup(config); final IReportEngineFactory factory = (IReportEngineFactory) Platform .createFactoryObject(IReportEngineFactory.EXTENSION_REPORT_ENGINE_FACTORY); engine = factory.createReportEngine(config); final IReportRunnable design = engine.openReportDesign(REPORT_FILE_PATH); task = engine.createRunAndRenderTask(design); task.setRenderOption(renderOptions); task.run(); } catch (Exception e) { getLogger().error(e.getMessage(), e); } finally { if (task != null) { task.close(); } if (engine != null) { engine.destroy(); } Platform.shutdown(); } }</pre></div><div> </div><p>In my classpath is a reference to the birt runtime in my target plattform, dunno what i can do anymore and can´t find something on your site.</p><p> </p><p>P.S. usiing BIRT 4.3.1</p><p> </p><p>thx anyway</p><p> </p><p>Florian</p>