verter Posted March 12, 2007 Share Posted March 12, 2007 I use iReport 1.3.0 and create java application with jasperreports-1.3.0.jar for building reports and export data to MS Excel. I've got a report template file (*.jrxml). In "Pattern" property of the text field I set format "0.00" for represent double value. When I get the report in MS Excel then all double values has "0" format - it's very sad((: In java code to data transfer into jasper I use my own class MyJRDataSource implements JRDataSource where I override method getFieldValue: public Object getFieldValue(JRField jrField) { if ("SUMMARY".equals(name)) return new Double(5.75); return null;{ What I should to do that to win this problem? Post edited by: verter, at: 2007/03/12 08:33Post edited by: verter, at: 2007/03/12 08:35 Link to comment Share on other sites More sharing options...
fwhorton Posted March 19, 2007 Share Posted March 19, 2007 Does Excel change 5.75 to anything or just removes zeros beyond decimal points? If it removes zeros after decimal points then you might have to change the column format in Excel to something that has decmial points (Currency or Custom). Link to comment Share on other sites More sharing options...
fwhorton Posted March 19, 2007 Share Posted March 19, 2007 Does Excel change 5.75 to anything or just removes zeros beyond decimal points? If it removes zeros after decimal points then you might have to change the column format in Excel to something that has decmial points (Currency or Custom). 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