Jump to content

Frame elements formatting issue with MS Word version 2409


Go to solution Solved by Bruno Guima,

Recommended Posts

Posted
I would like to export a Jasper report containing multiple Text Fields grouped under a FRAME element to Microsoft Word (.docx) format.

Since MS Word version 2409, I have encountered a formatting issue with tables (FRAME elements).

The column widths are noticeably shifted to the left, making the report difficult to read and edit, even though the alignment of headers and values is correctly configured (as confirmed by the PDF output, which displays the columns properly alligned). I have tested this issue across multiple JasperSoft Studio versions, but it persists in all of them.

Attached are the "problematic" section of the .jrxml file and the generated outputs in both PDF and Word formats (with anonymized data for privacy).

I would like to know:

  1. If this is a known issue or bug
  2. When a fix might be available
  3. If there are any "workaround" solutions to resolve the issue

Thank you in advance for your assistance.

missaligned.png

JRXML.txt PDF table.pdf WORD table.docx

  • Solution
Posted

Hello. I have been facing the same problem.

I tried to set 2 property:

<property name="net.sf.jasperreports.export.docx.frames.as.nested.tables" value="false"/>
<property name="net.sf.jasperreports.export.docx.table.fitColumns" value="true"/>

Try that to see if it helps you.

Posted

Thank you for the clarification.

The property:

<property name="net.sf.jasperreports.export.docx.frames.as.nested.tables" value="false"/>

worked perfectly—I included it in the Jasper Server configuration file to apply it to all reports.

 

However, setting the property:

<property name="net.sf.jasperreports.export.docx.table.fitColumns" value="true"/>

did not make any difference in my (our) case, so I omitted it. Still, I’m saving this solution for future reference, in case something similar arises.

Thank you very much for your advice!

  • Like 1
Posted (edited)

Yeah i needed to update my answer. The fitColumns property change is not needed. I was facing the same problem as you, noticed that, the second property wasnt needed after answering you. But you figured that out.

Edited by Bruno Guima
Posted

Hi,

This has been addressed here:
https://github.com/TIBCOSoftware/jasperreports/issues/494

Note that I'm not saying "it was fixed", because in essence, this is a Microsoft Word issue and I encourage people to contact Microsoft and ask why they introduced the change.

Also, it is not the only issue. You'll probably notice nowadays you can no longer have words break and long words will force cells to be wider. Unfortunately there is no way to work around this new issue as Microsoft Word itself no longer allows you to do so in their own application.

I hope this helps.

Teodor

  • Like 1

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