Html reports without charts [message #998335] |
Wed, 09 January 2013 15:31  |
Eclipse User |
|
|
|
Hello,
am i using birt with rcp and i can't generate a html report with charts embeded. Tables work fine but charts (images) are not renderized
My code:
EngineConfig config = new EngineConfig();
config.setEngineHome("C:/Users/Junger/Desktop/birt-runtime-4_2_1/ReportEngine");
IReportEngineFactory factory = (IReportEngineFactory) Platform.createFactoryObject( IReportEngineFactory.EXTENSION_REPORT_ENGINE_FACTORY );
IReportEngine engine = factory.createReportEngine( config );
engine.changeLogLevel( Level.WARNING );
IReportRunnable design = null;
try {
design = engine.openReportDesign(rpt);
} catch (EngineException e) {
e.printStackTrace();
}
IRunAndRenderTask task = engine.createRunAndRenderTask(design);
//Set parameter values and validate
task.setParameterValue("pAcc", account);
task.validateParameters();
//Setup rendering to HTML
HTMLRenderOption options = new HTMLRenderOption();
options.setOutputFileName("output.html");
options.setOutputFormat("html");
options.setImageDirectory("output");
options.setEmbeddable(false);
options.setImageHandler(new HTMLServerImageHandler());
options.setSupportedImageFormats("PNG;GIF;JPG;BMP;SWF;SVG");
task.setRenderOption(options);
//run and render report
try {
task.run();
} catch (EngineException e) {
e.printStackTrace();
}
browser.setUrl("...strategy.html");
It seems like a missing library, on eclipse's Report Designer works fine. What i'm doing wrong?
|
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.03218 seconds