Jump to content
We've recently updated our Privacy Statement, available here ×

Docx report stretches Right, outside of page


spera

Recommended Posts

Hi,

I have a report that looks ok when exported to Pdf and Rtf, but when exported to Docx it stretches right to the point where part of the data is no longer visible.

This report has 6 subreports.

If I remove the first subreport(the one at the top of the detail band), than the Docx document does not stretch anymore (at all).

If I leave the first subreport, but remove one or more of the other subreports, the stretching decreases, to the point where it's barely noticeable (if I leave only the first subreport and remove all the others).

So I'm guessing, it's the first subreport  that triggers the stretching and the others just increase it (sounds silly, I know).

Has anybody experienced anything simililar and has figured out a workaround?

I've attached an archive containing:

- the sources of the main report (Test_MBA_Invoice_PB) and all it's 6 subreports(I've changed all queries to select dummy data from dual so they can be tested on any Oracle database connection);

- the compiled reports;

- the required properties files;

- 3 versions of the report (generated in both pdf and docx): one with all subreports, one without the first sr, and one only with the first sr;

I'm guessing this is not intended behaviour, so it's probably a bug of the Docx exporter.

If anybody has a workaround for this, or if someone with a more inquisitive nature looks into this issue and figures out the cause, I would deeply appreciate it.

PS. I'm using JasperReports/IReport 3.6.1 and also tried it with iReport 3.6.2 and got the same behaviour.

Thanks

Link to comment
Share on other sites

  • Replies 4
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Hi,

 

In the documents you sent, please indicate what exactly is the problem.

If you refer to the field $F{SEQNR}, which displays value 3 in PDF, but is not present in DOCX, then this is cause by the fact that it is overlapped with 1 pixel by the text field sitting next to it. And the DOCX exporter is a grid exporter, in which overlapping element sdo not appear.

 

I hope this helps.
Teodor

 

Link to comment
Share on other sites

Hi Teodor,

Thankyou for looking into this.

The problem is that the docx document stretches and it does not fit into an A4 page anymore. (Use the Print Layout view)

I've attached some print screens of the open FullReport document from the archive. One of the Pdf document and two of the Docx document (opened with Word2007 and a patched Word2003).

On the Pdf print screen I've circled the area that does not appear on the Docx document.

Off Topic: When you say Overlapping Elements do not appear does this mean we won't be able to show the picture from the background Band?

Thanks

Link to comment
Share on other sites

Hi,

 

The file you sent looks just fine in my Word 2007. Screnshot attached.

And yes, background image will not appear in DOCX, as you can see.

 

Maybe we can do something about it. We could identify content coming from the background section and use some sort of layers in DOCX (if something like this exists). You could log this as a RFE on our trackers.

 

Thanks,

Teodor

 



Post Edited by teodord at 12/14/2009 16:18
Link to comment
Share on other sites

It may be that we have different Word versions.

Our versions are:

  • Microsot Office Word2007 (12.0.4518.1014)  installed on the same machine with Office 2003 (don't know if it's relevant)
  • Microsoft Office Word 2003 (11.6359.6360)  SP1 which can also view docx.

We've managed to find a workaround this problem, although we don't know what was causing it.

In an attempt to pin point the cause of this stretching business, my colleague has rebuilt the troublesome subreport with a different structure which involved removing some background pictures and rearraging the fields. As a result it does not stretch anymore, so I guess all's well that ends well.

 Thankyou

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...