Call XLS Tribix Emitter from Php Java Bridge [message #777251] |
Tue, 10 January 2012 01:13  |
Eclipse User |
|
|
|
Dear Jason,
I have had a look at the documentation of how to call the Tribix emitter from the Report API.
I have followed the steps of placing the jar files in their respective locations.
I came across the code:
EXCELRenderOption options = new EXCELRenderOption();
options.setOutputFormat("xls");
options.setOutputFileName("output/resample/ps.xls");
options.setOption(IRenderOption.EMITTER_ID, "org.eclipse.birt.report.engine.emitter.prototype.excel");
IRenderTask task = engine.createRenderTask(document);
task.setRenderOption(options);
or
EXCELRenderOption options = new EXCELRenderOption();
options.setOutputFormat("xls");
options.setOutputFileName("output/resample/ps.xls");
options.setOption(IRenderOption.EMITTER_ID, "org.uguess.birt.report.engine.emitter.xls");
IRenderTask task = engine.createRenderTask(document);
task.setRenderOption(options);
I am wondering how to call if from my php javabridge?
For the moment I have the following code:
$taskOptions = new java("org.eclipse.birt.report.engine.api.RenderOption");
$outputStream = new java("java.io.ByteArrayOutputStream");
$taskOptions->setOutputStream($outputStream);
$taskOptions->setOutputFormat("xls");
$task->setRenderOption( $taskOptions );
$task->run();
$task->close();
Could you please inform me how pass these parameters from php?
Thanks in advance
Karvesh
|
|
|
|
|
|
|
|
|
Re: Call XLS Tribix Emitter from Php Java Bridge [message #986871 is a reply to message #893793] |
Thu, 22 November 2012 03:03  |
Eclipse User |
|
|
|
Hi, I am trying to do this also. After following the steps mentioned above. Even without set :
$taskOptions->setOption("IRenderOption.EMITTER_ID","org.uguess.birt.report.engine.emitter.xls");
The chart image is included in the excel. I guess the engine use the 1st emitter found which happens to be Tribix. (mentioned in the blog post)
Besides this, there is a problem of formatting, the table formatting is not accurate comparing to the default xls emitter.
Anyone has any clue about this?
[Updated on: Thu, 22 November 2012 03:04] by Moderator
|
|
|
Powered by
FUDForum. Page generated in 0.26004 seconds