Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 324860

Summary: BIRT Pagination and Page Variables not working
Product: z_Archived Reporter: Jason Weathersby <jasonweathersby>
Component: BIRTAssignee: Gang Liu <hustlg>
Status: VERIFIED FIXED QA Contact: Xiaoying Gu <bluesoldier>
Severity: normal    
Priority: P3 CC: birtdevsatwork, bluesoldier, duy274qe65, helmut.neubauer, pigargo, pinny, ruthven, wenfeng.fwd
Version: 2.6.1   
Target Milestone: 2.6.2   
Hardware: PC   
OS: Windows 7   
Whiteboard: Obsolete
Attachments:
Description Flags
example report none

Description Jason Weathersby CLA 2010-09-09 11:16:27 EDT
See the attached report.  The page break interval is set to 0 and the page variables work with Web Viewer and Html, but if you export the report to pdf from the viewer (after rendering in html) the page variables are not updated in the pdf output (check the shipped group pages--Last couple of pages in report).

If the pageBreakInterval is set to 20 and the same process is used the page variables show up correctly.
Comment 1 Jason Weathersby CLA 2010-09-09 11:17:12 EDT
Created attachment 178524 [details]
example report
Comment 2 Missing name Mising name CLA 2010-10-06 03:20:50 EDT
For me the importance of the bug was a P3 Major because I have to display the header of the first page with other informations then the other pages. But I can't use different masterpages, because the printed row always be the same. The only criteria is the pagenumber and this I don't get, because of this bug.

To set the interval is not possible, because then the report for example on the first page is filled with 10% text and the next page is filled with 90% text. Such a report I can't send to a customer.
Comment 3 Gang Liu CLA 2010-10-20 03:58:48 EDT
fixed.
Comment 4 Xiaoying Gu CLA 2010-10-20 23:10:14 EDT
Verified in 2.6.2.v20101021-0630.
Comment 5 Brad Johnson CLA 2010-10-29 15:24:55 EDT
I downloaded the attached report grouppagination.rptdesign and ran it under the nightly birt-runtime-2_6_2-N20101028.zip. I loaded up the report in the viewer and then clicked export and exported it as a PDF. In the PDF the page numbers don't show up in the header. It's just showing "of".

Is this not actually fixed or is the fix not included in the nightly I downloaded?
Comment 6 Brad Johnson CLA 2010-10-29 15:30:35 EDT
Also is this bug the same as bug# 326513?
Comment 7 Xiaoying Gu CLA 2010-11-01 03:31:02 EDT
Thanks for reporting.

This issue was fixed in the report designer. But it seems still existing in the birt-runtime. Reopen for further investigation.
Comment 8 Xiaoying Gu CLA 2010-11-04 06:31:09 EDT
Actually, in deployment environment, the test report need to be modified before using. 

The scripts relating to locale disk operation should be removed:
importPackage( Packages.java.io );
out = new PrintWriter( new FileWriter( "c:/test/getDefaultValueList.txt", true ) );
out.println( "getDefaultValue ");
out.close();

After commenting out above code, the report works fine in the birt-runtime.

Marks as fixed.
Comment 9 Xiaoying Gu CLA 2010-11-04 06:31:34 EDT
Verified in daily build 2.6.2.20101104-0630.
Comment 10 Missing name Mising name CLA 2010-11-15 08:34:15 EST
I have tested the example report with the birt-runtime-2_6_2-N20101028. The page number in the masterpage was absolutly correct, but if I will show the page number in the header of the group the page number was always 1.

For my test I have copied the autotext field of the masterpage in the group header and the I have tried to use a text Field with <viewtime-value-of>vars["GROUP_PAGE"]</viewtime-value-of>. In both versions the page number was 1.
Comment 11 Pinny Markowitz CLA 2010-12-16 15:12:35 EST
Will there be a patch for v2.6.1 with this fix?  Or is v2.6.2 scheduled for release in the near future?
Comment 12 Wenfeng Li CLA 2010-12-16 19:35:25 EST
(In reply to comment #11)
> Will there be a patch for v2.6.1 with this fix?  Or is v2.6.2 scheduled for
> release in the near future?

2.6.2 release is scheduled for Feb 2011.  But we will create daily builds on the tip of the 2.6.2 stream.  You can find the downloads from this page

 http://download.eclipse.org/birt/downloads/build_list.php
Comment 13 birtdevsatwork CLA 2010-12-22 13:09:46 EST
(In reply to comment #12)
> (In reply to comment #11)
> > Will there be a patch for v2.6.1 with this fix?  Or is v2.6.2 scheduled for
> > release in the near future?
> 
> 2.6.2 release is scheduled for Feb 2011.  But we will create daily builds on
> the tip of the 2.6.2 stream.  You can find the downloads from this page
> 
>  http://download.eclipse.org/birt/downloads/build_list.php

Would it be possible to get a list of files that were modified with this fix and what revision numbers those were?
Comment 14 Gang Liu CLA 2011-01-06 21:06:46 EST
Changelist for this bug:

/org.eclipse.birt.report.engine/src/org/eclipse/birt/report/engine/nLayout/area/impl/RootArea.java 
version1.12 --> version 1.12.2.1
Comment 15 Colin Ruthven CLA 2011-06-04 12:44:07 EDT
When I run this example with the noted file operations removed from Eclipse it still fails on PDF output.
I am running the 2.6.2 bundled version -
      BIRT Framework	2.6.2.r262_v20101008-9iF7A9JGHMBCRz-R8tbxRel8kQrI	org.eclipse.birt.feature.group

The web viewer shows correct page numbers but for PDF I see "   of   " on each page.

What am I doing incorrectly?
Comment 16 Jason Weathersby CLA 2011-06-06 15:06:55 EDT
How are you running it?  Page Variables currently require separate run and render task.  Like using the /frameset mapping in the viewer.  If you are running directly to pdf this only uses a runandrender task which is not supported with page variables.  If you are using the api you need to do a run task which creates a rptdocument and then use this document in a render task.
Comment 17 Colin Ruthven CLA 2011-06-07 11:02:11 EDT
Thanks.

It works fine using the two step approach from within Eclipse. We were just running the report directly and not seeing the page numbers.