Bug 150239 - [Improve Page Break Management] Invalid pageNumber at repeated group header in PDF output
Summary: [Improve Page Break Management] Invalid pageNumber at repeated group header i...
Status: VERIFIED WONTFIX
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: BIRT (show other bugs)
Version: 2.1.0   Edit
Hardware: PC Windows 2000
: P3 normal (vote)
Target Milestone: 2.5.0 RC1   Edit
Assignee: Wei Yan CLA
QA Contact: mindan xu CLA
URL:
Whiteboard: Obsolete
Keywords: plan
Depends on:
Blocks:
 
Reported: 2006-07-11 08:06 EDT by Johann Wilfling CLA
Modified: 2009-05-17 22:06 EDT (History)
6 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Johann Wilfling CLA 2006-07-11 08:06:10 EDT
Setup: Report with table group. Option "Repeat header" is activated. Expression of group header is defined as following:
  "Current page number " + pageNumber
PDF output of report (table) spans over multiple pages.

Expected outcome of table group header within PDF output at page 2:
  "Current page number 2"

Resulting outcome of table group header within PDF output at page 2:
  "Current page number 1"
Comment 1 Wei Yan CLA 2006-07-19 04:14:25 EDT
as we has support the page-number as the auto-text, so can we remove the page-number in the onCreate/onRender time? (The page-number can only be accessed in onPageBreak).
Comment 2 Wenfeng Li CLA 2006-07-19 18:11:05 EDT
(In reply to comment #1)
> as we has support the page-number as the auto-text, so can we remove the
> page-number in the onCreate/onRender time? (The page-number can only be
> accessed in onPageBreak).

onPageBreak() is only triggered for when page is break because of a page break setting in the design, correct?  page break due to master page size limit will not triggered onPageBreak(), or will it?

I agree that we might need to remove the pageNumber from the onCreate() script, because the page number could change depends on the final output format of the report.  The pageNumber in the onCreate() script will not be correct for certain output format.

on the other hand, in onRender(), the page number should be supported?

Can we review this as part of the overall scripting API enhancement?
Comment 3 Jiaying Liu CLA 2006-10-12 04:06:22 EDT
Does this mean we should make a variable of a element in script configurable?
For example, when editting script for "OnCreate" method, "pageNumber" is invisible in the help context of "this". And it comes to be visible when editting script for "OnRender"/"OnPageBreak"?
Comment 4 Wenfeng Li CLA 2006-10-14 04:25:18 EDT
suggest to remove the pagenumber property from "this" in onCreate/onPageBreak, and have it at onRender().

I think onPageBreak() can not have the correct page number neither during report creation time, because it only accounts for logical page break, it doesn't account for paper-size trigged new pages.

Comment 5 Ivy Li CLA 2006-10-17 02:53:44 EDT
Engine team controls the script 
Comment 6 Jiaying Liu CLA 2006-10-17 05:13:24 EDT
Engine decide if they could support this.
Comment 7 Gang Liu CLA 2006-10-19 00:23:02 EDT
Suggest to also remove the pageNumber property in OnRender script. Because at render time, the pageNumber is also uncertain. For example, layout engine starts to render a image. First the onRender script is executed, current page number is n. But this image may be put into n+1 page due to the page size limitation.
Comment 8 Wenfeng Li CLA 2006-10-19 12:16:26 EDT
Is it correct that when onRender() is executed, the current page is n?   I think it is correct to have the value of this.pageNumber to be n.  I think it is ok that some or all of the "this" will be render to page n+1, but if it starts at "n", this.pagenumber can be "n".   Table report item is another example that when onRender is triggered, its pagenumber is n, but a table could span from page n to m.
Comment 9 Rima Kanguri CLA 2006-11-13 21:39:00 EST
Changing on behalf of Renuka
Comment 10 Wenfeng Li CLA 2006-12-18 16:58:45 EST
suggest to allow pageNumber in onRender but not onCreate and onPrepare events.
Comment 11 Wenfeng Li CLA 2007-05-21 00:40:28 EDT
add the "plan" key word for release planning.
Comment 12 Wei Yan CLA 2009-04-27 23:29:43 EDT
defer to RC1 due to resource limitation.
Comment 13 Wei Yan CLA 2009-05-15 04:28:27 EDT
The page number is the system defined page variable, it can only be used in the onRender and onPageScript or auto-text element. see #159857



Comment 14 mindan xu CLA 2009-05-17 22:06:03 EDT
Mark as verified first.