3

I'm using dynamic jasper 5.0.3 to generate xlsx file. When I set in SimpleXlsxReportConfiguration to wrap text like this:

configuration.setWrapText(true)

I have problem with column height in rows where at least one cell has content width is larger than header width. Those rows are taller than rest. You can see it below (rows 12 and 13):

https://i.stack.imgur.com/KNPCK.png (I have too small reputation to post images directly here)

I tried to force row height in several ways with no result. I use FastReportBuilder and tried:

reportBuilder.setDetailHeight(15);
reportBuilder.setAllowDetailSplit(false);

I tried to set column style like this:

new StyleBuilder(false).setStretching(Stretching.NO_STRETCH).build();

Changing streching type to RELATIVE_TO_TALLEST_OBJECT or RELATIVE_TO_BAND_HEIGHT doesn't work too.

In configuration I have those lines:

configuration.setRemoveEmptySpaceBetweenRows(true);
configuration.setCollapseRowSpan(true);

One thing I noticed is that when I set:

configuration.setCollapseRowSpan(false);

report looks like that:

https://i.stack.imgur.com/JUauL.png

You can notice that those lines from previous example (12 and 13) were made from 2 rows but with added rowspan. It seems that even word wrap property is turned off dynamic jasper calculates row height as if it wasn't.

Is it possible to force dynamic jasper to set same height for all cells in this case?

1 Answers1

0

I have tried to achieve the same height for all the cells in the PDF table by using reportBuilder.setDetailHeight(50) method. I got the expected result.