Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 334267 - Page break doesn't work in word emitter
Summary: Page break doesn't work in word emitter
Status: RESOLVED INVALID
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: BIRT (show other bugs)
Version: 2.6.2   Edit
Hardware: PC Linux
: P3 normal (vote)
Target Milestone: 3.7.0   Edit
Assignee: Birt-ReportEngine-inbox@eclipse.org CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-01-13 10:09 EST by vdemin CLA
Modified: 2011-06-14 14:23 EDT (History)
4 users (show)

See Also:


Attachments
Example report (5.43 KB, text/plain)
2011-02-11 10:57 EST, vdemin CLA
no flags Details
Document generated (9.66 KB, application/msword)
2011-02-25 04:22 EST, Jun Ouyang CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description vdemin CLA 2011-01-13 10:09:38 EST
Build Identifier: M20100909-0800

BIRT 2.6.1
I have put a several page break in my report (with page-break-after=always). Html page break works correctly. When I export the report to PDF the page break works just fine. When I 
export the report to Word the page break is lost.

Reproducible: Always
Comment 1 Xiaoying Gu CLA 2011-02-10 02:08:34 EST
I can not reproduce this issue in 2.6.1.

It will be a great help if you could attach the report design that can reproduce this issue.
Comment 2 vdemin CLA 2011-02-11 10:57:32 EST
Created attachment 188784 [details]
Example report
Comment 3 vdemin CLA 2011-02-11 11:38:37 EST
My php-code looks like:

$taskOptions = new java("org.eclipse.birt.report.engine.api.RenderOption");
$outputStream = new java("java.io.ByteArrayOutputStream");
$taskOptions->setOutputStream($outputStream);
$taskOptions->setOutputFormat("doc");
$ih = new java("org.eclipse.birt.report.engine.api.HTMLServerImageHandler");
$taskOptions->setImageHandler($ih);            
$task->setRenderOption($taskOptions);
$task->render();
Comment 4 Jun Ouyang CLA 2011-02-25 04:20:58 EST
I can't reproduce this bug, my java code is like follows:

		IReportRunnable design = engine
		        .openReportDesign( "D:/workspace/runtime-New_configuration/Reports4/attachment.rptdesign" );

		IRunAndRenderTask task = engine.createRunAndRenderTask( design );
		HTMLRenderOption options = new HTMLRenderOption( );
		options.setOutputFileName( "d:/test.doc" );
		options.setOutputFormat( "doc" );
		task.setRenderOption( options );
		task.run( );
		task.close( );

Please attache the render options.
Comment 5 Jun Ouyang CLA 2011-02-25 04:22:03 EST
Created attachment 189779 [details]
Document generated
Comment 6 Xiaoying Gu CLA 2011-03-04 02:13:07 EST
Set as worksforme.
Comment 7 vdemin CLA 2011-06-09 18:35:08 EDT
You right. If use RunAndRenderTask, page break is exported OK.
But If use RenderTask (after RunTask), page break ignored.

>Please attache the render options.
Sorry, what do you mean? Is this not $taskOptions (see my php code)?
Comment 8 vdemin CLA 2011-06-14 06:40:43 EDT
Hmm.. I replaced

$taskOptions = new java("org.eclipse.birt.report.engine.api.RenderOption");

to

$taskOptions = new java("org.eclipse.birt.report.engine.api.HTMLRenderOption");
$taskOptions->setHtmlPagination(true);

And now it's OK. It's not like a logical solution, but so be it.
Set as RESOLVED.
Comment 9 Wei Yan CLA 2011-06-14 13:18:26 EDT
If you uses the RenderOption, you need set the HTMLPagination to true manually, as the RenderOption is a generic option which doesn't include any default settings for specific output.

If you uses the HTMLRenderOption, the HTMLPagination is default to true.
Comment 10 vdemin CLA 2011-06-14 14:23:39 EDT
>If you uses the RenderOption, you need set the HTMLPagination to true manually
How?

>If you uses the HTMLRenderOption, the HTMLPagination is default to true.
HTMLPagination is default to true even if you use RenderOption, but only for RunAndRenderTask. For RenderTask, HTMLPagination is default to false.