rsilverns.sympatico.ca Posted December 9, 2006 Share Posted December 9, 2006 I have a report being exported as a CSV file which is behaving strangely. One of my fields is having " placed around the numeric value when a format is applied to it. My data row consists of... NAME | ACCT DESCRIPTION | ACCT VALUE | ACCT NOTES where all values are Strings, except ACCT VALUE which is a Big Decimal. When I apply no formatting the value prints fine.. e.g. 1152.42, however when I try to introduce a thousand's seperator ',' the problem is encounterd.. 1152.42 becomes "1,152.42" rather than 1,152.42 (the quotes are showing up in export file). Is this some feature of CSV exporter related to the width of my fields in the report file, or is it a bug? Anyone with input please feel free to post. Thx,RobinPost edited by: rsilver@bfm.bm, at: 2006/12/08 18:19 Link to comment Share on other sites More sharing options...
joeycn Posted December 10, 2006 Share Posted December 10, 2006 Comma(,) is the delimitation of the fields in csv files,so the quotation mark means that this comma is just a comma. :) Link to comment Share on other sites More sharing options...
rsilverns.sympatico.ca Posted December 11, 2006 Author Share Posted December 11, 2006 Ahh good point... but whereas my seperation character has been switched to be a "|" it still surrounds the commas with quotes? Edit: After looking at the source code, it appears that they assume all commas to be the delimeter even if the delimiter is switched. Will issue a bug on this one. Thx,RobPost edited by: rsilver@bfm.bm, at: 2006/12/11 12:17 Link to comment Share on other sites More sharing options...
szaharia Posted December 13, 2006 Share Posted December 13, 2006 Hi, The problem you observed was solved. All separator chars are now treated equally, and if you have some data fields containing one of the given separators, you'd better choose another one as field separator. Otherwise, the entire field value will be still quoted.Sources were committed on http://scm.jasperforge.org/svn/repos/jasperreports Best regards,sanda 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