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

Bug 341855

Summary: Difficulty using data from first/last table row of page in page header/footer.
Product: z_Archived Reporter: Peter Hancox <phancox>
Component: BIRTAssignee: Birt-ReportEngine-inbox <Birt-ReportEngine-inbox>
Status: RESOLVED WONTFIX QA Contact: Xiaoying Gu <bluesoldier>
Severity: normal    
Priority: P3 CC: bluesoldier, jouyang
Version: unspecified   
Target Milestone: 3.7.0   
Hardware: PC   
OS: Windows 7   
Whiteboard:
Attachments:
Description Flags
Sample report design showing the issue. none

Description Peter Hancox CLA 2011-04-04 21:17:00 EDT
Build Identifier: 20110218-0911

Page variables used in page header/footer that are set in onCreate for a table row will typically contain data from the row following the desired row.

For example, a page header meant to show data from the first row on the page will show data from the second row and a page footer meant to show data from the last row on the page will show data from the first row on the following page.

Can probably be worked around by continually saving data from prior row and using that to set page variables but work around is non-intuitive. Also behaviour on first and last page appears to be slightly different and may need to be coded specifically in  the work around.

Reproducible: Always

Steps to Reproduce:
Refer attached report design and the following discussion on BIRT Exchange forum:

http://www.birt-exchange.org/org/forum/index.php/topic/21879-table-data-in-page-header/page__p__74880__fromsearch__1&#entry74880
Comment 1 Peter Hancox CLA 2011-04-04 21:19:37 EDT
Created attachment 192513 [details]
Sample report design showing the issue.

Test report developed by Michael Williams on BIRT Exchange forum.
Comment 2 Jun Ouyang CLA 2011-04-07 04:43:58 EDT
We have to execute next row before firing page break event. Because sometimes page break interval happens on the last row of group/table, in such cases we need to guarantee the group/table footer will be output to current page but not next page. If we don't execute the next row, we are not able to judge if current row is the last row of group/table footer.

This behavior is not intuitive but it's constant and "expectable", user can adjust script correspondingly to get desired result.