Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 326513 - BIRT 2.6: PDF Report page number display problem.
Summary: BIRT 2.6: PDF Report page number display problem.
Status: NEW
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: BIRT (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows 7
: P3 normal with 5 votes (vote)
Target Milestone: Future   Edit
Assignee: Birt-ReportEngine-inbox@eclipse.org CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-09-29 06:59 EDT by Madhu CLA
Modified: 2016-12-07 13:08 EST (History)
11 users (show)

See Also:


Attachments
BIRT 2.3 PDF report is showing page 1 of 72 . (43.94 KB, patch)
2010-09-29 07:10 EDT, Madhu CLA
no flags Details | Diff
BIRT 2.6 PDF report is showing only page 1 of 2 (236.76 KB, patch)
2010-09-29 07:12 EDT, Madhu CLA
no flags Details | Diff
Birt 2.6 PDF report . (55.65 KB, image/x-png)
2010-09-29 23:25 EDT, Madhu CLA
no flags Details
Overlapping the tables rows data (116.71 KB, image/png)
2010-10-13 05:57 EDT, Madhu CLA
no flags Details
Simple Report to generate PDF pagination issue (163.07 KB, application/xml)
2010-10-13 16:12 EDT, shah.amar CLA
no flags Details
Simple report show PDF page number problem (45.52 KB, text/plain)
2010-10-14 06:18 EDT, Madhu CLA
no flags Details
RESERVE_DOCUMENT_PAGE_NUMBERS_output (5.44 KB, image/gif)
2010-10-21 17:28 EDT, shah.amar CLA
no flags Details
Report with RESERVE_DOCUMENT_PAGE_NUMBERS option (163.99 KB, text/plain)
2010-10-21 17:30 EDT, shah.amar CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Madhu CLA 2010-09-29 06:59:14 EDT
Build Identifier: Version: Helios Release Build id: 20100617-1415

When I upgrade from BIRT 2.3 to Birt 2.6 I found PDF page number display problem.  

Designed the master page  footer “page n of m “  format  using “Type of auto text” settings.

Report design:

On top of Masterpage with footer (page numbers) we have one table and grid.
Table - Page break  interval is set as “0” .
Grid –used page break  before “ Always”, because I want this grid should be always last page.
Table contain 1000 rows  and BIRT 2.3 is working as I expected below.

Page 1 to 10
Page 2 to 10
Page 3 to 10
…………………
………………….
…………………
………………..
Page 10 to 10

but now  BIRT 2.6 and 2.6.1 PDF result is showing wrong page numbers. 

Page 1 of 2
Page 1 of 2
………………..
…………………
………………..
…………………
Page 2 of 2


Reproducible: Always
Comment 1 Madhu CLA 2010-09-29 07:10:19 EDT
Created attachment 179828 [details]
BIRT 2.3 PDF report is showing page 1 of 72 .
Comment 2 Madhu CLA 2010-09-29 07:12:19 EDT
Created attachment 179829 [details]
BIRT 2.6 PDF report is showing only page 1 of 2

2.6 and 2.6.1 both Versions are failed for page numbers display.
Comment 3 Madhu CLA 2010-09-29 07:16:19 EDT
This looks similar bug .. but still I can see this issue in BIRT 2.6 and 2.6.1 .
https://bugs.eclipse.org/bugs/show_bug.cgi?id=317021
Comment 4 Madhu CLA 2010-09-29 23:25:54 EDT
Created attachment 179915 [details]
Birt 2.6 PDF report .
Comment 5 Xiaoying Gu CLA 2010-10-08 02:11:56 EDT
(In reply to comment #4)
> Created an attachment (id=179915) [details]
> Birt 2.6 PDF report .

Have you tried to set your report as fixed layout and set page break
interval=40 (default value)?
Comment 6 aszopko CLA 2010-10-11 09:37:33 EDT
I got the exact same problem (it worked in 2.5.2 as well, 2.6.0 got the somehow wrong code). Our platform is WinXP though, if it matters.

I described the problem in details on the BIRT exchange forum:
http://www.birt-exchange.org/org/forum/index.php/topic/20563-page-number-autotext-issue-in-birt-2-6-0/ 


If I set the page break interval to a small number, the page number is increased correctly, but this is not good for our reports, because we use quite large headers in the table groups, thus not every page will contain equal amounts of rows.

The conclusion was that the page break event may not getting called when the page count resets.
Comment 7 Xiaoying Gu CLA 2010-10-12 04:30:36 EDT
(In reply to comment #6)
> I got the exact same problem (it worked in 2.5.2 as well, 2.6.0 got the somehow
> wrong code). Our platform is WinXP though, if it matters.
> I described the problem in details on the BIRT exchange forum:
> http://www.birt-exchange.org/org/forum/index.php/topic/20563-page-number-autotext-issue-in-birt-2-6-0/ 
> If I set the page break interval to a small number, the page number is
> increased correctly, but this is not good for our reports, because we use quite
> large headers in the table groups, thus not every page will contain equal
> amounts of rows.
> The conclusion was that the page break event may not getting called when the
> page count resets.

Have you tried to set the page layout = fixed layout + page break interval = 0?
In this way, PDF and HTMl has the same pagination, and each PDF page will have as much contents as it can.
The page number should be correct in this setting.
Comment 8 Madhu CLA 2010-10-13 05:57:06 EDT
Created attachment 180750 [details]
Overlapping the tables rows data
Comment 9 Madhu CLA 2010-10-13 06:02:32 EDT
page layout = fixed layout + page break interval = 0 settings are giving correct page numbers,but fixed layout causing another problem for table data see the attached screenshot(Overlapping the table rows data).
Comment 10 shah.amar CLA 2010-10-13 16:12:36 EDT
Created attachment 180822 [details]
Simple Report to generate PDF pagination issue

Attached is the sample simple report to demenstrate PDF pagination issue. can some from BIRT team identify the issue and suggest when can we have fix for this. This is affecting one of major release. We have come far way to BIRT 2.6.1 upgrade to roll it back to 2.3
Comment 11 Xiaoying Gu CLA 2010-10-14 01:19:19 EDT
(In reply to comment #10)
> Created an attachment (id=180822) [details]
> Simple Report to generate PDF pagination issue
> Attached is the sample simple report to demenstrate PDF pagination issue. can
> some from BIRT team identify the issue and suggest when can we have fix for
> this. This is affecting one of major release. We have come far way to BIRT
> 2.6.1 upgrade to roll it back to 2.3

Please change the report layout to "Fixed Layout" in Report->Property Editor -> General.
After this change, the report pagination of pdf is what you expected.
Comment 12 Xiaoying Gu CLA 2010-10-14 01:57:20 EDT
(In reply to comment #9)
> page layout = fixed layout + page break interval = 0 settings are giving
> correct page numbers,but fixed layout causing another problem for table data
> see the attached screenshot(Overlapping the table rows data).

I can not reproduce this overlapping issue, unless you have set the table row height value in property editor.

Could you please upload the report design for us to investigate?
Comment 13 Madhu CLA 2010-10-14 03:07:14 EDT
Yes i used percentage for table column width, so I don't think Fixed layout is work for me .. is there any other way to reslove this issue.
Comment 14 Xiaoying Gu CLA 2010-10-14 03:23:44 EDT
(In reply to comment #13)
> Yes i used percentage for table column width, so I don't think Fixed layout is
> work for me .. is there any other way to reslove this issue.

Current there is no other workaround.

Can you attach the report design for me to investigate? I set the column width in my report and still can not reproduce this issue.
Comment 15 Madhu CLA 2010-10-14 06:18:53 EDT
Created attachment 180867 [details]
Simple report show PDF page number problem
Comment 16 Madhu CLA 2010-10-14 06:26:06 EDT
Attached report(Simple report show PDF page number problem ) having PDF page number problem.( with Auto layout ) and here one more problem with PDF report each long length columns are cut-off.

If i change the same to Fixed Layout PAGE Number problem is getting resolved but both Web viewer and PDF reports are not clear ( sinking to left side and right side left  empty space).
Comment 17 Zsalab CLA 2010-10-19 04:04:29 EDT
I found an interesting workaround:
Put a fake, but valid javascript expression to the onRender event for the "Page Number" autotext ( forexample: fakeValue++; ) and the page numbering is working fine.

Work with fixed layout with default page break interval and pdf output.
Comment 18 shah.amar CLA 2010-10-21 17:27:00 EDT
Hi,

We use below option in PDFRenderOption while rendering report through server side code using Birt engine API. 
pdfOptions.setOption(IPDFRenderOption.RESERVE_DOCUMENT_PAGE_NUMBERS, false);

With this option we do get the page number even with Auto Layout report, but it still doesn't give the correct Total Page (attached image).

Also another issues, is now if we want the same behaviour with Birt Viewer, I try to set the same option in report's beforeRender() method as below
reportContext.getRenderOption().setOption(IPDFRenderOption.RESERVE_DOCUMENT_PAGE_NUMBERS, false);
(Attached is the report with this option)
I do not get to see even page number coming correctly as I get through running report via server side code described above. Do render options set in beforeRender method is taken in to consideration for rendering report by Birt engine.

Thanks
Amar
Comment 19 shah.amar CLA 2010-10-21 17:28:55 EDT
Created attachment 181452 [details]
RESERVE_DOCUMENT_PAGE_NUMBERS_output
Comment 20 shah.amar CLA 2010-10-21 17:30:27 EDT
Created attachment 181453 [details]
Report with RESERVE_DOCUMENT_PAGE_NUMBERS option
Comment 21 Brad Johnson CLA 2010-10-29 13:46:35 EDT
Is this bug the same as bug #324860?
Comment 22 Brad Johnson CLA 2010-11-04 14:21:45 EDT
(In reply to comment #21)
> Is this bug the same as bug #324860?

Ok looks like bug #324860 deals with Fixed Layout PDF reports while this bug is related to Auto Layout PDF reports only.
Comment 23 Ghislain Gadbois CLA 2011-03-10 15:27:51 EST
This seems to be solved in 2.6.2. Can anyone confirm?
Comment 24 Brad Johnson CLA 2011-03-28 14:46:43 EDT
(In reply to comment #23)
> This seems to be solved in 2.6.2. Can anyone confirm?

Yes, this seems to be working with the Birt 2.6.2 runtime for me as well. :-)
Comment 25 Anita Verma CLA 2016-02-11 07:24:20 EST
I am facing the same issue in Birt version 4.4.0 also, please let me know if this issue is fixed.
Comment 26 Sudha Mallenahalli CLA 2016-12-07 13:08:11 EST
I am having the same problem where I get the following when exported to PDF

Page 1 of 2
Page 2 of 2
Page 3 of 3
Page 4 of 4
...........



I will not be able to change it to Fixed Layout because my footer will have to have variable height to display either 2 lines of data or 15 lines of data. So I have to set the footer height to nothing.
If the totalPage works fine in Auto Layout, I should be able to work it out.
Please let me know if the totalPage problem is fixed. My BIRT version is 4.5.2
Comment 27 Sudha Mallenahalli CLA 2016-12-07 13:08:49 EST
I am having the same problem where I get the following when exported to PDF

Page 1 of 2
Page 2 of 2
Page 3 of 3
Page 4 of 4
...........



I will not be able to change it to Fixed Layout because my footer will have to have variable height to display either 2 lines of data or 15 lines of data. So I have to set the footer height to nothing.
If the totalPage works fine in Auto Layout, I should be able to work it out.
Please let me know if the totalPage problem is fixed. My BIRT version is 4.5.2