html报表中带有统计的柱状图,就报错了,生成doc、pdf格式的报表正确。报错信息是:
严重: Error.OutputFormatNotSupported
org.eclipse.birt.report.engine.api.UnsupportedFormatException: The output format org.eclipse.birt.report.engine.emitter.html is not supported.
生成html报表时部分代码如下:
IRenderOption htmlOptions = new HTMLRenderOption(options);
ByteArrayOutputStream bos = new ByteArrayOutputStream();
htmlOptions.setOutputStream(bos);
htmlOptions.setOutputFormat(HTMLRenderOption.OUTPUT_EMITTERID_HTML);
((HTMLRenderOption) htmlOptions).setHtmlRtLFlag(false);
((HTMLRenderOption) htmlOptions).setEmbeddable(false);
((HTMLRenderOption) htmlOptions).setImageDirectory(imagePath);
task.setRenderOption(htmlOptions);
在线急等,要不晚上得加班了,哈哈哈