Bug 542614 - Generated Pdf ignores height set (and shown) in report Editor
Summary: Generated Pdf ignores height set (and shown) in report Editor
Status: NEW
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: BIRT (show other bugs)
Version: 4.7.0   Edit
Hardware: PC Windows 7
: P3 critical with 5 votes (vote)
Target Milestone: ---   Edit
Assignee: Birt-Build CLA
QA Contact:
URL:
Whiteboard:
Keywords:
: 551651 (view as bug list)
Depends on:
Blocks:
 
Reported: 2018-12-10 07:27 EST by Davide Ceraso CLA
Modified: 2020-04-23 18:56 EDT (History)
2 users (show)

See Also:


Attachments
Sample report to reproduce the problem. (6.89 KB, application/octet-stream)
2018-12-10 07:27 EST, Davide Ceraso CLA
no flags Details
Report Editor screenshot (14.79 KB, image/png)
2018-12-10 07:34 EST, Davide Ceraso CLA
no flags Details
Changed Code Screenshot (119.09 KB, image/png)
2018-12-10 07:35 EST, Davide Ceraso CLA
no flags Details
Generated PDF with current 4.8 Birt (1.42 KB, application/pdf)
2018-12-10 07:36 EST, Davide Ceraso CLA
no flags Details
Generated PDF with specified change reverted (1.39 KB, application/pdf)
2018-12-10 07:38 EST, Davide Ceraso CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Davide Ceraso CLA 2018-12-10 07:27:47 EST
Created attachment 276874 [details]
Sample report to reproduce the problem.

Since BIRT v.4.7 (and still in v4.8) the generated Pdf file ignores the height defined in the Report Editor.

This problem affects about 57 report by us.

The root cause is the change from commit f84d0f812a72ba8e54f6caf641e16442d480594c
to the TableLayout class in org.eclipse.birt.report.engine bundle. (I was not able to find any bug ticket related to this commit).

Reverting this change fixes our problem (but most likely it will bring back the problem that raised this change, if any).

Attached you can find:
 - a sample report where to reproduce the problem. 
 - a screenshot of the report editor that shows how the report is correctly displayed there
 - a screenshot of the code change that causes the problem
 - a generated pdf of the attached report with the current 4.8 Birt version that shows the error
 - a generated pdf of the attached report with the above change reverted.
Comment 1 Davide Ceraso CLA 2018-12-10 07:34:21 EST
Created attachment 276875 [details]
Report Editor screenshot
Comment 2 Davide Ceraso CLA 2018-12-10 07:35:21 EST
Created attachment 276876 [details]
Changed Code Screenshot
Comment 3 Davide Ceraso CLA 2018-12-10 07:36:50 EST
Created attachment 276877 [details]
Generated PDF with current 4.8 Birt
Comment 4 Davide Ceraso CLA 2018-12-10 07:38:00 EST
Created attachment 276878 [details]
Generated PDF with specified change reverted
Comment 5 Henning von Bargen CLA 2019-10-24 09:07:39 EDT
*** Bug 551651 has been marked as a duplicate of this bug. ***
Comment 6 ivkina CLA 2020-04-23 14:13:14 EDT
Same issue in 4.9 release candidate. Fixed layout reports rely on row height honored especially when rows are empty as this approach allows to achieve desired layout for pre-printed forms like checks, w-2s, pre-formatted bills or any other reports where fixed/exact presentation is critical.

This is serious, critical issue which makes upgrade from 4.6 to any latest version impossible. 

Seems to be broken in PDF only. All other formats like html, excel, docx and ppt are Ok. But pdf is the most accurate and important format therefore that must  be be supported. Not to mention now you have different output for html vs pdf. 

When this can be fixed? 

Thanks,
Comment 7 ivkina CLA 2020-04-23 18:56:10 EDT
The problem introduced in https://github.com/eclipse/birt/commit/f84d0f812a72ba8e54f6caf641e16442d480594c


class org.eclipse.birt.report.engine.nLayout.area.impl.TableLayout

line 850-851:
// Do not use specified height if row is empty to avoid endless page break
int sheight = isEmptyRow( rowArea ) ? 0 : rowArea.getSpecifiedHeight( );
int height = sheight;


Should be 
int sheight = rowArea.getSpecifiedHeight( );
int height = sheight;

Then it works fine (as before). Maybe you need to set height to 0 only when layout is NOT fixed, e.g.:
int sheight = (!isFixedLayout && isEmptyRow( rowArea )) ? 0 : rowArea.getSpecifiedHeight( );
int height = sheight;