Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » BIRT » Manual page break with DEAPI
Manual page break with DEAPI [message #1065936] Fri, 28 June 2013 11:54 Go to next message
Bianca D. is currently offline Bianca D.Friend
Messages: 17
Registered: February 2013
Junior Member
Hi everybody,

I have a report which displays several grids containing text labels (short and long descriptions). The grid cells have a row-span >= 1, so some cells span across a couple of rows (see attached image). Now I have an issue when a cell is broken across two pages, so I would like to avoid that by checking the height of the grid cells and if necessary break it to the next page manually. Is there a way to do that with the DEAPI?

I tried to find example implementations, but couldn't.

I would appreciate any help!

Best Regards
Bianca
  • Attachment: Table.PNG
    (Size: 56.49KB, Downloaded 187 times)
Re: Manual page break with DEAPI [message #1067066 is a reply to message #1065936] Fri, 05 July 2013 15:57 Go to previous messageGo to next message
Michael Williams is currently offline Michael WilliamsFriend
Messages: 1925
Registered: July 2009
Senior Member

Sorry for the delay. You should be able to use the onCreate of the row to do calculations on each row of data to keep track of how far down the page you are, then set your page break before if the current row won't fit based on your calculations.

.setOnCreate(java.lang.String script)


Michael

Developer Evangelist, Silanis
Re: Manual page break with DEAPI [message #1067067 is a reply to message #1067066] Fri, 05 July 2013 16:05 Go to previous messageGo to next message
Bianca D. is currently offline Bianca D.Friend
Messages: 17
Registered: February 2013
Junior Member
Hi Michael,

thank you for your reply! What I don't know how to do is the calculation itself. Are there any properties that give some information on where I am on the current page? All I tried didn't return anything. And than I still have to figure out how long the current row is going to be. Any ideas how to do that?

Best regards
Bianca
Re: Manual page break with DEAPI [message #1067072 is a reply to message #1067067] Fri, 05 July 2013 16:48 Go to previous message
Michael Williams is currently offline Michael WilliamsFriend
Messages: 1925
Registered: July 2009
Senior Member

When I've done this within a BIRT report before, I used a variable defined in the initialize method of the report, then based on the text in my current row, I calculated how many lines it would take up. I did this for each row, adding to my pageTotalLines variable and when my current computation showed that I would go over the number of lines I can fit, I'd set the page break. Then, in the onPageBreak event, reset the pageTotalLines count to start on the next page.

Michael

Developer Evangelist, Silanis
Previous Topic:Charts appearing randomly
Next Topic:[SOLVED] Problem with date parameters
Goto Forum:
  


Current Time: Fri Apr 19 08:25:59 GMT 2024

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

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

Back to the top