How To Avoid Tables In Generated JasperReports MS Word Document ?

JRDocxExporter is a exporter based on the table paradigm, so tables cannot be suppressed completely. Every item of your jasper report will be always arranged in a table.
Following tips can help you to improve editability and usability of your MS Word Document generated with JasperReports.

Use FRAMES_AS_NESTED_TABLES and FLEXIBLE_ROW_HEIGHT with JRDocxExporter

...
JRDocxExporter exporter = new JRDocxExporter();
exporter.setParameter(JRDocxExporterParameter.FRAMES_AS_NESTED_TABLES,  Boolean.FALSE);
exporter.setParameter(JRDocxExporterParameter.FLEXIBLE_ROW_HEIGHT,  Boolean.TRUE);
...

Note: If FLEXIBLE_ROW_HEIGHT set to true you takes the user possibility to ignore bottom margin height.

Simplify JasperReports Layout File and write your report content in Java

Before:

ReportElementsBefore

After:

ReportElementsAfter

...
reportParameters.put("Value3","LabelValue3: "+value3);
reportParameters.put("Value4","LabelValue4: "+value3);

Simplify JasperReports Layout File and style your report content in Java

Before:

ReportElements2Before

After:

ReportElements2After

...
reportParameters.put("Value1","TitleValue1: 
"+value1); ...

Set textField Markup to “styled” .. for such page maximize band height and size textField to width and height of the container, if all elements in your page has same width and are equally positioned (x – axis) it also can help.

Requirement Engineering, Business Analysis, Agile, Analysis and Design with UML, Java/J2EE, Liferay, Javascript, Embedded C++, MDD, Executable UML, Project Management


© 2017 JULIUSURBAN.NET