Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 351064 - PageBreakInside : Avoid does not work with Word output
Summary: PageBreakInside : Avoid does not work with Word output
Status: REOPENED
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: BIRT (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows 7
: P3 normal with 1 vote (vote)
Target Milestone: ---   Edit
Assignee: Birt-ReportEngine-inbox@eclipse.org CLA
QA Contact: Xiaoying Gu CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-07-04 06:20 EDT by sebastien.dsf CLA
Modified: 2020-05-29 12:19 EDT (History)
8 users (show)

See Also:


Attachments
A test case to show differences between PDF and Word output (3.73 KB, application/octet-stream)
2011-07-04 06:23 EDT, sebastien.dsf CLA
no flags Details
Rptdesign shows crosstab page break error (33.93 KB, text/xml)
2011-08-11 12:25 EDT, Scott CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description sebastien.dsf CLA 2011-07-04 06:20:10 EDT
Build Identifier: 20110218-0911

I tried to use PageBreakInside with value "avoid" on a Grid with two rows. With PDF ouput everything works fine but with Word ouput the Grid can be break in two parts.

Reproducible: Always
Comment 1 sebastien.dsf CLA 2011-07-04 06:23:16 EDT
Created attachment 199035 [details]
A test case to show differences between PDF and Word output
Comment 2 Jun Ouyang CLA 2011-07-05 03:28:53 EDT
Page break avoid is not supported by Word.
Comment 3 Jun Ouyang CLA 2011-07-05 05:00:12 EDT
Exporting doc directly will output all content as a single page, in word, the page break is actually generated by Word but not by report engine.

User can export doc from web viewer to avoid this problem in this special case, because the page break will be generated by report engine. However, Word will break page by itself if the contents in 1 word page exceeds the size of word page. It is not under control of report engine, so BIRT is not able to guarantee page break avoid to work in word.
Comment 4 vdemin CLA 2011-07-18 07:15:48 EDT
(In reply to comment #2)
> Page break avoid is not supported by Word.

How about "Keep with next" (page break AFTER avoid) and "Keep lines together" (page break INSIDE avoid) ?
Comment 5 Jun Ouyang CLA 2011-07-18 23:04:14 EDT
Vdemin,

That sounds like a good solution. Thanks, we will try to use it.
Comment 6 Scott CLA 2011-08-04 12:00:09 EDT
I've seen very similar behavior on a crosstab with two rows.  I set PageBreakInside to "avoid" on both the crosstab and its rowarea, but I can still get a two row crosstab split across two pages.  This happens in Word only, not in pdf.  I'll attach a sample report that shows this.
Comment 7 Scott CLA 2011-08-04 12:14:22 EDT
(In reply to comment #6)
> I'll attach a sample report that shows this.

Well, it won't let me add an attachment, but I have an example if anyone wants to see it.
Comment 8 Jun Ouyang CLA 2011-08-04 22:47:23 EDT
(In reply to comment #7)
> (In reply to comment #6)
> > I'll attach a sample report that shows this.
> 
> Well, it won't let me add an attachment, but I have an example if anyone wants
> to see it.

Scott, please attach your example, thanks.
Comment 9 Scott CLA 2011-08-11 12:25:17 EDT
Created attachment 201332 [details]
Rptdesign shows crosstab page break error
Comment 10 Scott CLA 2011-09-20 15:28:59 EDT
Any update on this?
Comment 11 Jun Ouyang CLA 2011-09-20 22:17:05 EDT
Scott,

As we didn't get time to fix it in 3.7.1, it will be fixed in 3.7.2.
Comment 12 Scott CLA 2011-09-21 10:23:35 EDT
Great!  3.7.2 will probably be released around Spring of next year, correct?
Comment 13 Tobias Knell CLA 2012-08-01 05:06:16 EDT
Any news on this? 

Still not fixed with version 4.2.
The page break also doesn't work with odt files, does it?
Comment 14 Tobias Knell CLA 2012-08-28 03:45:09 EDT
Anyone alive ? :/

We could really need this feature, because without it, Word and ODT documents aren't really usable for our project. (page breaks happen in midst of tables that should print on a single site, small text passages with a pagebreak in between, pagebreak in midst of a table cell!)

Isnt't it possible to do this similar to the solution for pdf files?
Could someone at least tell me the locations of the current implementation of this feature in pdf files, so that I can look into this myself a bit?
Comment 15 Gang Liu CLA 2012-08-30 22:18:28 EDT
Currently page-break-inside: aovid is not supported in "viewing report in DOC". This feature is supported in "exporting to DOC", view report in web viewer, and export as doc format.
Comment 16 Tobias Knell CLA 2012-09-07 03:00:18 EDT
For everyone with this problem, here is the workaround when using the java api: http://www.eclipse.org/forums/index.php/m/909451/
Comment 17 vlad dev CLA 2013-12-05 11:51:19 EST
(In reply to Tobias Knell from comment #16)
> For everyone with this problem, here is the workaround when using the java
> api: http://www.eclipse.org/forums/index.php/m/909451/

The proposed solution splits a single table into many smaller tables, one per page, that makes further editing of the generated document cumbersome. You would have to move rows between tables manually.

The problem persists in BIRT 4.3.1 for DOC and DOCX formats. See https://bugs.eclipse.org/bugs/show_bug.cgi?id=423347
Comment 18 Henning von Bargen CLA 2014-04-29 03:42:22 EDT
I created a patch which solves this (at least if pageBreakInside="avoid" is specified at the row level), see
https://bugs.eclipse.org/bugs/show_bug.cgi?id=433725
Comment 19 Henning von Bargen CLA 2020-05-29 12:19:31 EDT
My version on https://github.com/hvbtup/birt should support this for DOCX and DOC.