Skip to main content



      Home
Home » Archived » BIRT » Manual page break with DEAPI
Manual page break with DEAPI [message #1065936] Fri, 28 June 2013 07:54 Go to next message
Eclipse UserFriend
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 216 times)
Re: Manual page break with DEAPI [message #1067066 is a reply to message #1065936] Fri, 05 July 2013 11:57 Go to previous messageGo to next message
Eclipse UserFriend
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)
Re: Manual page break with DEAPI [message #1067067 is a reply to message #1067066] Fri, 05 July 2013 12:05 Go to previous messageGo to next message
Eclipse UserFriend
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 12:48 Go to previous message
Eclipse UserFriend
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.
Previous Topic:Charts appearing randomly
Next Topic:[SOLVED] Problem with date parameters
Goto Forum:
  


Current Time: Thu Mar 27 03:57:04 EDT 2025

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

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

Back to the top