Marek D. Posted November 21 Posted November 21 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: If this is a known issue or bug When a fix might be available If there are any "workaround" solutions to resolve the issue Thank you in advance for your assistance. JRXML.txt PDF table.pdf WORD table.docx
Solution Bruno Guima Posted November 26 Solution Posted November 26 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.
Marek D. Posted November 28 Author Posted November 28 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! 1
Bruno Guima Posted Monday at 03:10 PM Posted Monday at 03:10 PM (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 Monday at 03:15 PM by Bruno Guima
Teodor Danciu - Staff Posted Tuesday at 01:23 PM Posted Tuesday at 01:23 PM 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 1
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now