Dynamically changing text field size
Posted on March 23, 2023 at 6:21am
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!
Joined: Mar 19 2023 - 11:41pm
Last seen: 12 hours 26 min ago
Posted on March 24, 2023 at 10:55am
Define your columns headers and fields

then define in report the property
<property name="net.sf.jasperreports.export.csv.field.delimiter" value="\"/>
Joined: Oct 18 2017 - 5:41pm
Last seen: 1 month 2 weeks ago
Posted on March 26, 2023 at 4:55am
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.
Joined: Mar 19 2023 - 11:41pm
Last seen: 12 hours 26 min ago