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)
pageNumber in pdf output
adamdc78
I'm attempting to manually hide/display data values under certain conditions. One condition for displaying the value is that it occurs on the first row of a page. When outputting to pdf, the page number does not correspond to the page numbering in the report (because pdfs are restrict by page size).
For instance, one grouping's results spans 3 pages, but the page number when output next to each row remains the same for all of them, whether the row is actually on page 5 or page 7 of the pdf report.
Is there any way to check that a row is at the top of a new pdf page (rows are quite complex, in some cases only 4 rows will fit per page, in others, dozens).
As a very simplified example of what's happening:
text, text, 1
text, text, 1
text, text, 1
--- pdf page break ---
text, text, 1
text, text, 1
--- pdf page break ---
text, text, 2
text, text, 2
where the integer value displayed is the value in pageNumber.
Find more posts tagged with
Comments
mwilliams
What is your BIRT version?
adamdc78
Thanks for the response, I'm using BIRT 2.5.
I need two groups dropping to detail and the outer group doesn't get processed correctly, so I've combined the two groups and just need to control the display logic (if that makes what I'm trying to do any clearer).
mwilliams
In earlier versions of BIRT, there was a bug with the "natural" page breaks in PDF. The end of page events only fired when a page break was forced by you manually or if the page break interval was met. The way you'll have to fix this is to set a page break interval that will definitely fit onto a single page. If you cannot do this, you'll have to find a way to compute when you need to insert a page break in script, based on the rows so far on the page. Upgrading to the newest version would also fix your issue. Hope this helps. Let me know if you have more questions.
adamdc78
<blockquote class='ipsBlockquote' data-author="'mwilliams'" data-cid="99983" data-time="1336145477" data-date="04 May 2012 - 08:31 AM"><p>
In earlier versions of BIRT, there was a bug with the "natural" page breaks in PDF. The end of page events only fired when a page break was forced by you manually or if the page break interval was met. The way you'll have to fix this is to set a page break interval that will definitely fit onto a single page. If you cannot do this, you'll have to find a way to compute when you need to insert a page break in script, based on the rows so far on the page. Upgrading to the newest version would also fix your issue. Hope this helps. Let me know if you have more questions.<br /></p></blockquote>Thanks for the response. Just going to work without the outer drop to detail and live with it for now.
mwilliams
If you want to try to reproduce the issue with the sample database or with some sample data in a flat file or XML source, I'll be able to take a closer look. Just attach it in here, if you make it.