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)
Page Break Table Group
kosta
Hello BIRT community,
is it possible to define different page break rules for different groupings from one table?
For example my table has 5 groups. The first four groups doesnt need page break but the last group should have an page break.
For any suggetsions and hints thanks in advance.
Find more posts tagged with
Comments
veerababuk
Hi All,
I am not able to provide page break in group. please check the attached screenshot showing where I want have page break. please let me know if any one is having solution.
I am using BIRT version 2.2.2.
Thanks,
Veerababu K
mwilliams
Veerababu K,
Based on your diagram, you should be able to select the row that you want to page break after, go to the page break section of the property editor for that row, and make the page break after "always". Let me know.
mwilliams
kosta,
Can you explain more? Where are the page breaks? Within the group? Or you want the first 4 to go in series, then page break before the last? Let me know.
kosta
Hello Michael,
like you mentioned, I want the first to go in series and then before the last group to have pagebreak.
It was only an example scenario 4+1, but it can be 3+2, 2+3, or even more complicated 1+1+2 or any other combination.
Thanks in advance.
mwilliams
Kosta,
You can force a page break in script, so if you kept a count of your groups, you could add script within your table to page break when you reach your intervals that you'd like. So, if you wanted to page break after 4, you'd just check your group count variable for a value of 4. When you hit this value, you'd set the pagebreakafter to "always" in script. Let me know if you'd like an example. If you do, please let me know your BIRT version!
kosta
Yeah, an example would be nice to have. Acctually that was my first idea that this would be possible with some sort of script. Maybe the pagebreak can be also done depend on the groupname.
I am using 2.6.2 at the moment.
Thank you, Michael.
kosta
Like here described in this post:
http://www.birt-exchange.org/org/forum/index.php/topic/20228-group-number/page__hl__group counter__fromsearch__1
I could create group counter. The only change is that the counter is not init in the "initialize()"-method of the report but in the "onPrepare"-method of the TableGroup.
The only place I can set the "pageBreakAfter" property on the TableGroupHeader is the "onPrepare" and "onPageBreak" method.
- "onPrepare" is invoke once at the begining of the table when my counter is still 0. So here doesn't make sence to set the pageBreakAfter property.
- "onPageBreak" is invoked then when the page break happends, too late. I can't explain myself why is here even possible to set the page break properties to any value.
Is there any other way to create the page breaks depend on the group counter?
Thanks for any suggestion and hints.
mwilliams
Take a look at this report. You can see where there is script by going to the script section of the outline. Let me know if you have questions! Hope this helps.
kosta
Thanks Michael,
it works now.
The magic was setting the "pageBreakAfter" after invoking the "getStyle()" method.
Beside that the report parameters combo box looks cool.
mwilliams
Not a problem at all!