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)
PDF page numbers when page size causes pageBreak
grather
<p>When I create a report that will be output to PDF.</p>
<p> </p>
<p>The page breaks I put in work fine. My rptdocument know which pages.</p>
<p> </p>
<p>But when the first page has too much text. the page size limitation kicks in and at render time I get a new page.</p>
<p> </p>
<p>But my page number 1 of 2 (for example) is incorrect.</p>
<p> </p>
<p>I see others struggling with this issue but can't quite put a way to fix this.</p>
<p> </p>
<p>I am using run and render as separate tasks.</p>
<p> </p>
<p>I have two pages according to the rptdocument</p>
<p> </p>
<p>But at render time I end up with three pages do to the abount of text on the page.</p>
<p> </p>
<p>How do I get Page 1 of 3 instead of 1 of 2 and so on?</p>
<p> </p>
<p>Gary</p>
Find more posts tagged with
Comments
mwilliams
<p>What is the report structure like? Also, what is your BIRT version?</p>
grather
<p>BIRT structure is One Table</p>
<p>each row holds text for one record.</p>
<p> </p>
<p>Depending on data the number of rows displayed per record changes.</p>
<p> </p>
<p>I am in 4.2.2</p>
<p> </p>
<p>Gary</p>
mwilliams
<p>Can a single row span an entire page? There have been bugs related to this and that could be a cause.</p>
<p> </p>
<p>If not, what is the page break interval set at on your table? The best setting for auto sizing and correct page breaks is to set the report layout to fixed (this is default) and to set the page break interval for the table to 0. Let me know if you already have this done.</p>
grather
<p>I do have the table page break interval = 0</p>
<p>The one row of the table has many elements.</p>
<p>It may span more than one row.</p>
<p>Depending on the data it may cause a page break or it may not.</p>
<p> </p>
<p>Thanks</p>
mwilliams
<p>Having a row that spans multiple pages is where we run into the page numbering issue. This is a known issue. If it's multiple elements that make up the single detail row, is there any way you could try separating them into multiple detail rows within the same table to see if that helps? If you select the table, you can right click on the detail row and add rows to the detail section. If it's not just one long text that's going over a page, this might help break up the detail row into manageable pieces for BIRT to be able to correctly handle page breaks.</p>
<p> </p>
<p>If it is one long text, you might need to process your data set to break up the very long texts into manageable chunks.</p>
<p> </p>
<p>You might also log a bug for this in the bugzilla at eclipse.org/birt in the community section. Or go to the bugzilla and find a current bug on this issue and "vote" for it.</p>
grather
<p>At this point I can not figure out a real workaround.</p>
<p>I don't believe the page size forcing a page break is actually triggering the onPageBreak event.</p>
<p>So it is hard to find anyway to detect while rendering.</p>
<p> </p>
<p>I still have no way to deal with this.</p>
mwilliams
<p>Can you reproduce the issue in a way that I can run it. As similarly set up to your design as possible? I'll be able to actually take a look at your scenario and test with it. You can use the sample database or a flat file or whatever (anything I can access and execute).</p>
anitaV
<p>I am also facing the same issue. I am using pageNumber variable in master page footer in image URI. When the page breaks automatically, then pageNumber variable is not incrementing. Please provide some solution for this.</p>
<p> </p>
<p>You are right that the onPageBreak event is not being triggered when the page breaks automatically.</p>