Truncate fields for html, but not for csv or .xlsx

We have a field in a report where the text can be potentially very large.  We would like to truncate the text to a reasonably displayable amount in our html version of the report, but would like the entire field value to display when export to .csv, .xls, or .xlsx

Any suggestions on how we might achieve this?

gregg.dale_1's picture
Joined: Apr 27 2018 - 9:50am
Last seen: 3 years 5 months ago

2 Answers:

You can try setting this property in the report itself:

 <property name="net.sf.jasperreports.print.keep.full.text" value="true"/>

You can also set it globally in the file under WEB-INF\classes dir. 


vchiem's picture
Joined: May 1 2017 - 5:33pm
Last seen: 7 hours 8 min ago

This didn't work in our case, any thoughts on why this would not work?

We are using a Text Field element inside a Table component on Summary band.


uttam.shrestha's picture
Joined: Feb 1 2017 - 11:57am
Last seen: 3 years 4 months ago