Export in .doc without page breaks [message #629548] |
Tue, 28 September 2010 12:22  |
Eclipse User |
|
|
|
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 10:46   |
Eclipse User |
|
|
|
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
|
|
|
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.17168 seconds