Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » BIRT » Export in .doc without page breaks(Export in .doc without page breaks from within RCP application)
icon5.gif  Export in .doc without page breaks [message #629548] Tue, 28 September 2010 12:22 Go to next message
Ivan is currently offline Ivan
Messages: 6
Registered: July 2010
Location: Serbia
Junior Member

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 Go to previous messageGo to next message
Jason Weathersby is currently offline Jason Weathersby
Messages: 9167
Registered: July 2009
Senior Member

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
icon9.gif  Re: Export in .doc without page breaks [message #630008 is a reply to message #629789] Thu, 30 September 2010 07:04 Go to previous messageGo to next message
Ivan is currently offline Ivan
Messages: 6
Registered: July 2010
Location: Serbia
Junior Member

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. Sad

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 11:31 Go to previous messageGo to next message
Jason Weathersby is currently offline Jason Weathersby
Messages: 9167
Registered: July 2009
Senior Member

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] Sun, 10 October 2010 20:34 Go to previous messageGo to next message
Ivan is currently offline Ivan
Messages: 6
Registered: July 2010
Location: Serbia
Junior Member

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 14:36 Go to previous messageGo to next message
Jason Weathersby is currently offline Jason Weathersby
Messages: 9167
Registered: July 2009
Senior Member

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
Re: Export in .doc without page breaks [message #633699 is a reply to message #632155] Mon, 18 October 2010 20:24 Go to previous messageGo to next message
Ivan is currently offline Ivan
Messages: 6
Registered: July 2010
Location: Serbia
Junior Member

Erm... I'm kind a new to this...

Can you help me to open a bug for this?

Thanks,
Ivan
Re: Export in .doc without page breaks [message #633860 is a reply to message #633699] Tue, 19 October 2010 12:01 Go to previous message
Jason Weathersby is currently offline Jason Weathersby
Messages: 9167
Registered: July 2009
Senior Member

Ivan,

Check this link:
http://www.eclipse.org/birt/phoenix/community.php

Look at the Bugzilla heading. It explains the process.

Jason

On 10/18/2010 8:24 PM, Ivan wrote:
> Erm... I'm kind a new to this...
>
> Can you help me to open a bug for this?
>
> Thanks,
> Ivan
Previous Topic:Prevent query from running if table is hidden
Next Topic:Accessing remote birt designs in BIRT Viewer
Goto Forum:
  


Current Time: Tue Jul 29 08:51:42 EDT 2014

Powered by FUDForum. Page generated in 0.02263 seconds