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

Bug 247145

Summary: [Improve Page Break Management] Conditionally hidden object on masterpage is visible when rendering report to PDF.
Product: z_Archived Reporter: Radek Wikturna <Roderick>
Component: BIRTAssignee: Wei Yan <wyan>
Status: VERIFIED FIXED QA Contact: Xiaodan Wang <xwang>
Severity: normal    
Priority: P3 CC: bluesoldier, hustlg, wyan, zqian
Version: 2.3.1Keywords: plan
Target Milestone: 2.5.0 M7   
Hardware: PC   
OS: Windows XP   
Whiteboard: Autoed,G-text

Description Radek Wikturna CLA 2008-09-12 06:59:18 EDT
Conditionally hidden object on masterpage is visible when rendering report to PDF.

Occurs on latest All-in-one Birt 2.3

Steps:
1. Insert any object on the masterpage and set Hide Element and For ALL outputs. The condition is TRUE by default - keep it.
2. Preview the report - it works perfect. But when it is rendered to PDF, object is displayed.

I intend to hide it with condition "pageNumber == 1" which results to the same bug.
Comment 1 Gang Liu CLA 2008-09-18 05:48:01 EDT
The first case(The condition is TRUE) had been fixed in 2.3.1 release build.

The second case (The condition refers to 'pageNumber') can not supported in 2.3.1
Comment 2 Wei Yan CLA 2009-04-23 01:47:46 EDT
To generate the report, BIRT need first generate the content, calculate the size, layout the content into page, divide the content into pages.

The page number is calculated at the last stage while the visibility is calculated in the first stage. So we can't support to refer the page number in create/render time scripts.

In BIRT 2.5, BIRT introduce a new kind of scripts page scripts which is invoked in the last stage. The page number can only be referenced in that kind of scripts.

set the issue to fixed as the invisible element is hidden in PDF output in BIRT 2.3.1
Comment 3 Xiaodan Wang CLA 2009-04-24 02:43:33 EDT
For the 1st issue, "Hide elements for all outputs" works correctly in PDF.

For the 2nd issue, user can set the visibility condition in Scripts "onRender".

Verified in build (2.5.0.v20090424-0630).