Dynamically changing text field size

Hello,

How can we change text field width according to the data size, we want every row's width according to the data without whitespace.

For eg we want output in below format, there is a text field between every two delimiters and blank when null is enabled.

D\4889\01\1053122\01\MOF ABC\0\19.09.2017\545\ 0000000.00\\\

But getting output in below format because of fixed width of text field

D\2904889   \01\1053122\01\MOF ABC       \0\19.09.2017\922\ 00000000000000.00\           \               \

Note: Report output should be in .txt format

Please provide suggestions

Thanks in advance!

galurgi's picture
41
Joined: Mar 19 2023 - 11:41pm
Last seen: 12 hours 26 min ago

2 Answers:

Define your columns headers and fields

then define in report the property
<property name="net.sf.jasperreports.export.csv.field.delimiter" value="\"/>

eduardo_rhamos's picture
Joined: Oct 18 2017 - 5:41pm
Last seen: 1 month 2 weeks ago

thank you for your response!

I tried this solution, but the report needs to be in text format and this solution doesn't work for text files.

galurgi's picture
41
Joined: Mar 19 2023 - 11:41pm
Last seen: 12 hours 26 min ago
Feedback
randomness