Jump to content
We've recently updated our Privacy Statement, available here ×

Problem with double value format


verter

Recommended Posts

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:33

Post edited by: verter, at: 2007/03/12 08:35

Link to comment
Share on other sites

  • Replies 2
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

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

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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...