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

Bug 362245

Summary: Pagination is set differently for RunAndRender and Render tasks, with the result that page-break-pagination does not work for Render tasks
Product: z_Archived Reporter: Yaytay <jim-eclipsebugs>
Component: BIRTAssignee: Birt-ReportEngine-inbox <Birt-ReportEngine-inbox>
Status: NEW --- QA Contact: Liwen Chen <lchen>
Severity: major    
Priority: P3 CC: balazs_toth, bluesoldier, eclipse, frnkvnwrvn, jtatchel, petrisor_f, vladk.dev, zimmermann.tho
Version: unspecified   
Target Milestone: ---   
Hardware: All   
OS: All   
Whiteboard:

Description Yaytay CLA 2011-10-27 17:38:29 EDT
Build Identifier: 20110916-0149

For a report to support any paging the layoutEngine.layout method must be called with the final parameter set to true.
The RunAndRenderTask has a completely different way to calculate this final parameter from RenderTask.
In RunAndRenderTask the default is for the parameter to be true, it has to explicitly turned off by options to go away.
In RenderTask the parameter is more complex and effectively cannot be set to true for a page-break-pagination emitter unless either the report only has one page (?) or htmlRenderOption.getHtmlPagination( ) is true - but if HtmlPagination is true the layout engine does paper-size-pagination (or at least, it splits large tables into multiple pages).

I think the correct fix is in RenderTask.render(), where PAGE_BREAK_PAGINATION.equals( pagination ) and !paged, the call to layout should permit paging (because the emitter wants to do it):
    layoutEngine.layout( executor, report, emitter, true );
This fix would tally with the PAPER_SIZE_PAGINATION.equals( pagination ) case.

Reproducible: Always

Steps to Reproduce:
1. Take an emitter that is set for page-break-pagination.
2. Output a report with page breaks using the report designer - the report will page correctly.
3. Output the same report using separate Run and Render tasks - the report will not page correctly.
Comment 1 Xiaoying Gu CLA 2012-06-25 02:19:53 EDT
*** Bug 382871 has been marked as a duplicate of this bug. ***
Comment 2 vlad dev CLA 2013-06-17 04:47:10 EDT
Since the SpudSoft Excel emitter is part of BIRT distribution as of BIRT 4.3.0 (according to https://bugs.eclipse.org/bugs/show_bug.cgi?id=402962), are there any plans to fix this issue either in the RenderTask or in the Excel emitter.
Comment 3 Matthias Fraass CLA 2014-01-09 11:31:34 EST
I wonder as well.

Every time we are updating BIRT we have to patch RenderTask.java! Since BIRT 3.7!