rr9876r Posted August 29, 2018 Share Posted August 29, 2018 Hi, I have designed a simple report in Jaspersoft Studio 6.4.2 version. The report works fine as expected and encounter an issue when saving/exporting data into CSV format if the column data contains a comma and not enclosed the data value within double quotes. It is causing an issue when sending the CSV data file to another party because the number of cloumns in the record layout are different from other records in the file. For example, the report displays the like Title User ===> column headerSystem, Admin John, DoeDBA Smith, JoeWhen this exported into CSV format and will be looks like thisTitle,UserSystem,Admin,"John, Doe"DBA,"Smith, Joe" In the first line, the System, Admin is not within double quotes. This results the first line with with two commans and 2nd line with one comma. This is causing an issue when remapping CSV data in Excel and the data is not aligned correctlry. I can trim the comma from column data value but we wanted it. Any suggestions pleaseThanks Ram Link to comment Share on other sites More sharing options...
hozawa Posted August 29, 2018 Share Posted August 29, 2018 So, why not just surround the text with quotes?Quotes can be inserted by setting the following property to truenet.sf.jasperreports.export.csv.force.field.enclosure Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now