Community
Participate
Working Groups
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
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.
Created attachment 188784 [details] Example report
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();
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.
Created attachment 189779 [details] Document generated
Set as worksforme.
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)?
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.
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.
>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.