Export in .doc without page breaks [message #629548] |
Tue, 28 September 2010 16:22 |
|
Hi,
I integrated WebViewer in my RCP application. Main requirement is to allow users to view reports and to export them in .doc format.
Problem is that when the report is displayed in the WebViewer and exported in .doc format from within this WebViewer it contains unnecessary page breaks - when the table is bigger than the rest of the current page, page breaks and the table is displayed starting from beginning of the next page.
If big tables are frequent this causes a lot of unnecessary white space to be generated in .doc (lot of pages are less then half way filled).
When I export .doc file for the same report from within the Eclipse development environment with "View Report->View Report as DOC" the document is generated just fine, without unnecessary page breaks.
How can I display the report in the WebViewer so that when it is exported into .doc it does not contain these page breaks (layout should be same as when exported from within Eclipse IDE directly with "View as DOC")?
Currently I am using these parameters:
reportParameters = new HashMap<String, Object>();
emitterOptions = new HashMap<String, String>();
reportParameters.put("SERVLET_NAME_KEY", "frameset");
reportParameters.put("FORMAT_KEY", "html");
reportParameters.put("ALLOW_PAGE", "false");
reportParameters.put("SHOW_PARAMETER_PAGE", "false");
emitterOptions.put("Top Count", "6");
emitterOptions.put("Top Percentage", "15");
reportParameters.put("EMITTER_OPTIONS_KEY", emitterOptions);
I suppose that WebViewer inherently imposes page breaks because it allows navigation by pages...
ALLOW_PAGE parameter did not help (I am not sure what does it represent either :/)
Thanks in advance
Ivan
|
|
|
Re: Export in .doc without page breaks [message #629789 is a reply to message #629548] |
Wed, 29 September 2010 14:46 |
|
Ivan
The View as DOC uses a runandrender task whereas the
viewer uses a run task and then a render task. To get the viewer to
use the runandrender task you could change
reportParameters.put("SERVLET_NAME_KEY", "frameset");
to
reportParameters.put("SERVLET_NAME_KEY", "preview");
but this may be able to be fixed in the desginer. Is the report fixed
or auto layout. What version of BIRT are you using?
Jason
On 9/28/2010 12:22 PM, Ivan wrote:
> Hi,
>
> I integrated WebViewer in my RCP application. Main requirement is to
> allow users to view reports and to export them in .doc format.
> Problem is that when the report is displayed in the WebViewer and
> exported in .doc format from within this WebViewer it contains
> unnecessary page breaks - when the table is bigger than the rest of the
> current page, page breaks and the table is displayed starting from
> beginning of the next page.
> If big tables are frequent this causes a lot of unnecessary white space
> to be generated in .doc (lot of pages are less then half way filled).
>
> When I export .doc file for the same report from within the Eclipse
> development environment with "View Report->View Report as DOC" the
> document is generated just fine, without unnecessary page breaks.
>
> How can I display the report in the WebViewer so that when it is
> exported into .doc it does not contain these page breaks (layout should
> be same as when exported from within Eclipse IDE directly with "View as
> DOC")?
>
> Currently I am using these parameters:
> reportParameters = new HashMap<String, Object>();
> emitterOptions = new HashMap<String, String>();
>
> reportParameters.put("SERVLET_NAME_KEY", "frameset");
> reportParameters.put("FORMAT_KEY", "html");
> reportParameters.put("ALLOW_PAGE", "false");
> reportParameters.put("SHOW_PARAMETER_PAGE", "false");
> emitterOptions.put("Top Count", "6");
> emitterOptions.put("Top Percentage", "15");
> reportParameters.put("EMITTER_OPTIONS_KEY", emitterOptions);
>
> I suppose that WebViewer inherently imposes page breaks because it
> allows navigation by pages...
> ALLOW_PAGE parameter did not help (I am not sure what does it represent
> either :/)
>
> Thanks in advance
> Ivan
|
|
|
Re: Export in .doc without page breaks [message #630008 is a reply to message #629789] |
Thu, 30 September 2010 11:04 |
|
Hi Jason.
I've tried to make that change and see what happens and good thing is that the report HTML is rendered without page breaks but unfortunately I require the frameset functionality buttons (especially the "export report" button) so this solution is not acceptable.
I am using BIRT framework 2.5.2.
In the general properties tab, Layout preference is set to Fixed Layout.
Best regards,
Ivan
|
|
|
Re: Export in .doc without page breaks [message #630091 is a reply to message #630008] |
Thu, 30 September 2010 15:31 |
|
Ivan,
Can the problem be reproduced with the sample database? If so can you
post a report example that has the issue?
Jason
On 9/30/2010 7:04 AM, Ivan wrote:
> Hi Jason.
>
> I've tried to make that change and see what happens and good thing is
> that the report HTML is rendered without page breaks but unfortunately I
> require the frameset functionality buttons (especially the "export
> report" button) so this solution is not acceptable. :(
> I am using BIRT framework 2.5.2.
> In the general properties tab, Layout preference is set to Fixed Layout.
>
> Best regards,
> Ivan
|
|
|
Re: Export in .doc without page breaks [message #631951 is a reply to message #630091] |
Mon, 11 October 2010 00:34 |
|
Yes I think it can be done.
But as you can see, this issue can be reproduced with any database since exporting in .word from the frameset viewer (which splits the report to pages and allows navigation) always adds these (unnecessary) page breaks.
Best regards,
Ivan
|
|
|
Re: Export in .doc without page breaks [message #632155 is a reply to message #631951] |
Mon, 11 October 2010 18:36 |
|
Ivan,
Can you open a bug for this?
Jason
On 10/10/2010 8:34 PM, Ivan wrote:
> Yes I think it can be done.
>
> But as you can see, this issue can be reproduced with any database since
> exporting in .word from the frameset viewer (which splits the report to
> pages and allows navigation) always adds these (unnecessary) page breaks.
>
> Best regards,
> Ivan
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.03974 seconds