Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
PUBLIC CLOUD
PRIVATE CLOUD
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Intelligence (Analytics)
Excel render failure
GP76
Hi,
I get the following exception whne i try to render my report as an Excel. It works fine for html, word & pdf versions.
My report has dynamic columns and i setting column width as per the size of the largest data in that column.
I have found that if i remove column span which i need in one of the rows, the excel rendering works fine.
Moreover if i change the report to fixed layout, then it works with column span in place, but this truncates data when rendered as Excel.
Any pointers will be helpful.
Thanks
GP
Caused by: org.eclipse.birt.report.engine.api.EngineException: Error happened while running the report.
at org.eclipse.birt.report.engine.api.impl.RenderTask.render(RenderTask.java:306)
at org.eclipse.birt.report.service.ReportEngineService.renderReport(ReportEngineService.java:1547)
... 95 more
Caused by: java.lang.ArrayIndexOutOfBoundsException: -1
at java.util.ArrayList.get(ArrayList.java:324)
at org.eclipse.birt.report.engine.emitter.excel.DataCache.getColumnLastData(DataCache.java:167)
at org.eclipse.birt.report.engine.emitter.excel.layout.Page.getColumnLastData(Page.java:1008)
at org.eclipse.birt.report.engine.emitter.excel.StyleEngine.applyContainerBottomStyle(StyleEngine.java:266)
at org.eclipse.birt.report.engine.emitter.excel.layout.ExcelLayoutEngine.endNormalContainer(ExcelLayoutEngine.java:626)
at org.eclipse.birt.report.engine.emitter.excel.layout.ExcelLayoutEngine.endCell(ExcelLayoutEngine.java:483)
at org.eclipse.birt.report.engine.emitter.excel.ExcelEmitter.endCell(ExcelEmitter.java:137)
at org.eclipse.birt.report.engine.layout.html.HTMLTableLayoutEmitter.endCell(HTMLTableLayoutEmitter.java:721)
at org.eclipse.birt.report.engine.emitter.ContentEmitterUtil.endContent(ContentEmitterUtil.java:114)
at org.eclipse.birt.report.engine.layout.html.buffer.DummyPageBuffer.endContainer(DummyPageBuffer.java:66)
at org.eclipse.birt.report.engine.layout.html.HTMLStackingLM.end(HTMLStackingLM.java:42)
at org.eclipse.birt.report.engine.layout.html.HTMLAbstractLM.layout(HTMLAbstractLM.java:141)
at org.eclipse.birt.report.engine.layout.html.HTMLInlineStackingLM.resumeLayout(HTMLInlineStackingLM.java:111)
at org.eclipse.birt.report.engine.layout.html.HTMLInlineStackingLM.layoutNodes(HTMLInlineStackingLM.java:160)
at org.eclipse.birt.report.engine.layout.html.HTMLStackingLM.layoutChildren(HTMLStackingLM.java:26)
at org.eclipse.birt.report.engine.layout.html.HTMLAbstractLM.layout(HTMLAbstractLM.java:140)
at org.eclipse.birt.report.engine.layout.html.HTMLBlockStackingLM.layoutNodes(HTMLBlockStackingLM.java:70)
at org.eclipse.birt.report.engine.layout.html.HTMLStackingLM.layoutChildren(HTMLStackingLM.java:26)
at org.eclipse.birt.report.engine.layout.html.HTMLTableBandLM.layoutChildren(HTMLTableBandLM.java:67)
at org.eclipse.birt.report.engine.layout.html.HTMLAbstractLM.layout(HTMLAbstractLM.java:140)
at org.eclipse.birt.report.engine.layout.html.HTMLBlockStackingLM.layoutNodes(HTMLBlockStackingLM.java:70)
at org.eclipse.birt.report.engine.layout.html.HTMLStackingLM.layoutChildren(HTMLStackingLM.java:26)
at org.eclipse.birt.report.engine.layout.html.HTMLTableLM.layoutChildren(HTMLTableLM.java:132)
at org.eclipse.birt.report.engine.layout.html.HTMLAbstractLM.layout(HTMLAbstractLM.java:140)
at org.eclipse.birt.report.engine.layout.html.HTMLBlockStackingLM.layoutNodes(HTMLBlockStackingLM.java:70)
at org.eclipse.birt.report.engine.layout.html.HTMLStackingLM.layoutChildren(HTMLStackingLM.java:26)
at org.eclipse.birt.report.engine.layout.html.HTMLAbstractLM.layout(HTMLAbstractLM.java:140)
at org.eclipse.birt.report.engine.layout.html.HTMLBlockStackingLM.layoutNodes(HTMLBlockStackingLM.java:70)
at org.eclipse.birt.report.engine.layout.html.HTMLPageLM.layout(HTMLPageLM.java:92)
at org.eclipse.birt.report.engine.layout.html.HTMLReportLayoutEngine.layout(HTMLReportLayoutEngine.java:100)
at org.eclipse.birt.report.engine.api.impl.RenderTask$PageRangeRender.render(RenderTask.java:689)
at org.eclipse.birt.report.engine.api.impl.RenderTask.render(RenderTask.java:294)
... 96 more
Find more posts tagged with
Comments
mwilliams
What is your BIRT version? If using the newest version, can you file a bug for this? If not using the newest version, can you download a copy and give it a try. Also, if you're using the standard XLS emitter, that comes with BIRT, you could try one of the others that are out there. A couple of the free options are the Native Excel Emitter, which can be found in the devShare and the SpudSoft emitter, which can be found in the marketplace.
GP76
<blockquote class='ipsBlockquote' data-author="'mwilliams'" data-cid="109096" data-time="1346853670" data-date="05 September 2012 - 07:01 AM"><p>
What is your BIRT version? If using the newest version, can you file a bug for this? If not using the newest version, can you download a copy and give it a try. Also, if you're using the standard XLS emitter, that comes with BIRT, you could try one of the others that are out there. A couple of the free options are the Native Excel Emitter, which can be found in the devShare and the SpudSoft emitter, which can be found in the marketplace.<br /></p></blockquote>
<br />
Thanks for the response Williams.<br />
<br />
I am using version 3_7_0, which seems to be bit old. Will try the newest version and see how it goes.<br />
Yes i am using the standard XLS emitter that comes with BIRT.<br />
<br />
The other options that you have suggested for Excel Emitters, is there one that converts pagination into tabs in Excel and is easy to plugin ?
GP76
<blockquote class='ipsBlockquote' data-author="'GP76'" data-cid="109108" data-time="1346917574" data-date="06 September 2012 - 12:46 AM"><p>
Thanks for the response Williams.<br />
<br />
I am using version 3_7_0, which seems to be bit old. Will try the newest version and see how it goes.<br />
Yes i am using the standard XLS emitter that comes with BIRT.<br />
<br />
The other options that you have suggested for Excel Emitters, is there one that converts pagination into tabs in Excel and is easy to plugin ?<br /></p></blockquote>
<br />
<br />
One more query, is there a way of figuring out the render type before the 'onPrepare' event of the report item. Just was thinking not to do column span for excel rendering alone.
GP76
<blockquote class='ipsBlockquote' data-author="'GP76'" data-cid="109110" data-time="1346918843" data-date="06 September 2012 - 01:07 AM"><p>
One more query, is there a way of figuring out the render type before the 'onPrepare' event of the report item. Just was thinking not to do column span for excel rendering alone.<br /></p></blockquote>
<br />
dropAndClear() on the un-used row cell handles did the trick for me, to fix the excel render issue for the report with column span.<br />
<br />
Hope the information will be useful.
mwilliams
reportContext.getOutputFormat() should give you the output format.
As for the Excel emitters doing sheets for pagination, I believe both do. Also, they're both easy to plug-in because you just drop the jar file in and restart Eclipse.