Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » BIRT » How to move a report item from one page to the previous.
How to move a report item from one page to the previous. [message #997183] Fri, 04 January 2013 10:04 Go to next message
Jan Krakora is currently offline Jan KrakoraFriend
Messages: 477
Registered: December 2009
Location: Prague
Senior Member
Hi,

I have a table, each of its row contains an image (its size is as wide and as hight as the page except header and footer) and a grid.

I would like to move that grid up, so it will overlap the image like below
index.php/fa/12878/0/

I do that by setting top margin to the grid -50mm. The problem is, it cant produce PDF report. The PDF is corrupted and there is stacktrace:
 java.lang.NullPointerException
	at org.eclipse.birt.report.engine.layout.emitter.PageDeviceRender.drawBorder(PageDeviceRender.java:1086)
	at org.eclipse.birt.report.engine.layout.emitter.PageDeviceRender.drawTableBorder(PageDeviceRender.java:1306)
	at org.eclipse.birt.report.engine.layout.emitter.PageDeviceRender.endContainer(PageDeviceRender.java:585)
	at org.eclipse.birt.report.engine.layout.emitter.PageDeviceRender.visitContainer(PageDeviceRender.java:185)
	at org.eclipse.birt.report.engine.nLayout.area.impl.ContainerArea.accept(ContainerArea.java:274)
	at org.eclipse.birt.report.engine.layout.emitter.PageDeviceRender.visitChildren(PageDeviceRender.java:195)
	at org.eclipse.birt.report.engine.layout.emitter.PageDeviceRender.visitContainer(PageDeviceRender.java:184)
	at org.eclipse.birt.report.engine.nLayout.area.impl.ContainerArea.accept(ContainerArea.java:274)
	at org.eclipse.birt.report.engine.layout.emitter.PageDeviceRender.visitChildren(PageDeviceRender.java:195)
	at org.eclipse.birt.report.engine.layout.emitter.PageDeviceRender.visitContainer(PageDeviceRender.java:184)
	at org.eclipse.birt.report.engine.nLayout.area.impl.ContainerArea.accept(ContainerArea.java:274)
	at org.eclipse.birt.report.engine.layout.emitter.PageDeviceRender.visitChildren(PageDeviceRender.java:195)
	at org.eclipse.birt.report.engine.layout.emitter.PageDeviceRender.visitContainer(PageDeviceRender.java:184)
	at org.eclipse.birt.report.engine.nLayout.area.impl.ContainerArea.accept(ContainerArea.java:274)
	at org.eclipse.birt.report.engine.layout.emitter.PageDeviceRender.visitChildren(PageDeviceRender.java:195)
	at org.eclipse.birt.report.engine.layout.emitter.PageDeviceRender.addPage(PageDeviceRender.java:540)
	at org.eclipse.birt.report.engine.layout.emitter.PageDeviceRender.visitPage(PageDeviceRender.java:505)
	at org.eclipse.birt.report.engine.layout.emitter.PageDeviceRender.visitContainer(PageDeviceRender.java:179)
	at org.eclipse.birt.report.engine.nLayout.area.impl.ContainerArea.accept(ContainerArea.java:274)
	at org.eclipse.birt.report.engine.layout.emitter.PageEmitter.startPage(PageEmitter.java:51)
	at org.eclipse.birt.report.engine.nLayout.LayoutEngine.outputPage(LayoutEngine.java:892)
	at org.eclipse.birt.report.engine.nLayout.area.impl.PageArea.outputPage(PageArea.java:696)
	at org.eclipse.birt.report.engine.nLayout.area.impl.PageArea.close(PageArea.java:676)
	at org.eclipse.birt.report.engine.nLayout.area.impl.RootArea.close(RootArea.java:241)
	at org.eclipse.birt.report.engine.nLayout.LayoutEngine.closeContainer(LayoutEngine.java:374)
	at org.eclipse.birt.report.engine.nLayout.LayoutEngine._endContainer(LayoutEngine.java:486)
	at org.eclipse.birt.report.engine.nLayout.LayoutEngine.endContainer(LayoutEngine.java:359)
	at org.eclipse.birt.report.engine.emitter.ContentEmitterAdapter.endPage(ContentEmitterAdapter.java:70)
	at org.eclipse.birt.report.engine.emitter.CompositeContentEmitter.endPage(CompositeContentEmitter.java:171)
	at org.eclipse.birt.report.engine.emitter.ContentEmitterUtil.endContent(ContentEmitterUtil.java:102)
	at org.eclipse.birt.report.engine.layout.html.buffer.PageNode.end(PageNode.java:33)
	at org.eclipse.birt.report.engine.layout.html.buffer.HTMLPageBuffer.endPage(HTMLPageBuffer.java:292)
	at org.eclipse.birt.report.engine.layout.html.buffer.HTMLPageBuffer.endContainer(HTMLPageBuffer.java:136)
	at org.eclipse.birt.report.engine.layout.html.buffer.TableBreakBuffer.endContainer(TableBreakBuffer.java:421)
	at org.eclipse.birt.report.engine.layout.html.HTMLPageLM.end(HTMLPageLM.java:183)
	at org.eclipse.birt.report.engine.layout.html.HTMLPageLM.layout(HTMLPageLM.java:98)
	at org.eclipse.birt.report.engine.layout.html.HTMLReportLayoutEngine.layout(HTMLReportLayoutEngine.java:100)
	at org.eclipse.birt.report.engine.api.impl.RunAndRenderTask.doRun(RunAndRenderTask.java:180)
	at org.eclipse.birt.report.engine.api.impl.RunAndRenderTask.run(RunAndRenderTask.java:77)

If I change the image height so both, the image and the grid are on one page, then it works, but the image is not as high as the page.

How can I do that? Thanks
  • Attachment: report.png
    (Size: 833.03KB, Downloaded 1617 times)

[Updated on: Fri, 04 January 2013 10:59]

Report message to a moderator

Re: How to move a report item from one page to the previous. [message #997198 is a reply to message #997183] Fri, 04 January 2013 12:40 Go to previous messageGo to next message
Jan Krakora is currently offline Jan KrakoraFriend
Messages: 477
Registered: December 2009
Location: Prague
Senior Member
The only way I can avoid the NPE and thus generating the PDF report is setting this options

renderOption.setOption(PDFRenderOption.PAGE_OVERFLOW, IPDFRenderOption.CLIP_CONTENT);

This works fine but unfortunately only when the table's dataSet contains one row. If there are two or more rows,
they are cutted off instead of creating another pages.
Re: How to move a report item from one page to the previous. [message #997275 is a reply to message #997198] Fri, 04 January 2013 21:43 Go to previous messageGo to next message
Michael Williams is currently offline Michael WilliamsFriend
Messages: 1925
Registered: July 2009
Senior Member

Maybe something like this solution would work for you:

BIRT-Exchange Forum - Text on Image


Michael

Developer Evangelist, Silanis
Re: How to move a report item from one page to the previous. [message #997416 is a reply to message #997275] Mon, 07 January 2013 11:26 Go to previous message
Jan Krakora is currently offline Jan KrakoraFriend
Messages: 477
Registered: December 2009
Location: Prague
Senior Member
Thanks for your suggestions Michael. But it won't work for me because a background image in Birt has to be embedded or from shared resources. So it has to be static.
And I need that image to be dynamic from a dataSet.
Previous Topic:Webshpere ,birt version 'birt-runtime-2_5_2'
Next Topic:Line height property not working in pdf with value under 4mm
Goto Forum:
  


Current Time: Thu Apr 25 06:51:06 GMT 2024

Powered by FUDForum. Page generated in 0.02439 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top