Surrounding data with double quotation marks
Posted on June 7, 2018 at 3:19am
Hi,
I try to generate report schema in CSV format. I have to wrap each data in double quoutes. I've tried to use concatenate function [CONCATENATE("\"",$F{data},"\"")] in textFieldExpression but I only got data wrapped in three double quotes ["""210023258"""]. Is there any easy way to get rid of this unnecessary signs? I've found that I can extend some java class, and there add this signs, but I prefer to change somtehing in jrxml schema rather than writing a code.
Joined: Jun 7 2018 - 1:10am
Last seen: 4 years 9 months ago
Posted on June 7, 2018 at 4:06am
If you need each exported data to be enclosed within double quotes, set the following property in your report:
<property name="net.sf.jasperreports.export.csv.force.field.enclosure" value="true"/>
Set the textfield expression as $F{data}.
Joined: Sep 26 2006 - 8:06pm
Last seen: 9 months 1 week ago
Posted on June 7, 2018 at 5:20am
This is exacly what resolves my problem. Thanks.
Joined: Jun 7 2018 - 1:10am
Last seen: 4 years 9 months ago