kent.vickery Posted October 24, 2018 Share Posted October 24, 2018 I am using Jasper Reports Library 6.0.0.I am trying to export currency values to a CSV file. In Jasper, I have the BigDecimal textField using pattern "$ #,##0.00", with the following properties added: <property name="net.sf.jasperreports.export.csv.column.name" value="ChangeOverallBalance"/> <property name="net.sf.jasperreports.export.xls.pattern" value="$ #,##0.00"/>But when I export to CSV the cell is formatted as Currency, but using the (red for negative) ($1,1234.10) pattern - what I want is the -$(1,234.10) pattern.I've tried different patterns with net.sf.jasperreports.export.xls.pattern, but nothing seems to make any difference to how the CSV ends up.What am I doing wrong? Link to comment Share on other sites More sharing options...
kent.vickery Posted October 25, 2018 Author Share Posted October 25, 2018 Note at the top of my jrxml I am setting the property: <property name="net.sf.jasperreports.export.xls.detect.cell.type" value="true"/> Link to comment Share on other sites More sharing options...
tstuser Posted October 25, 2018 Share Posted October 25, 2018 set pattern as ,###,##,##0.00 in properties Link to comment Share on other sites More sharing options...
kent.vickery Posted October 25, 2018 Author Share Posted October 25, 2018 Using the pattern suggested above made no difference. When the CSV opens up the (red for negative) ($1,1234.10) pattern is still what is set for the column. Link to comment Share on other sites More sharing options...
kent.vickery Posted October 25, 2018 Author Share Posted October 25, 2018 Oh - I see you meant setting that pattern for the actual textField atrribute, as a Custom Format. That does change things, but then I am not getting the amount as a currency on any output (PDF, CSV). I need the dollar sign. 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