Jump to content
Changes to the Jaspersoft community edition download ×

Numeric Format


Recommended Posts

By: Danny Liu - dsyliu

Numeric Format

2003-07-10 09:11

I have a simple query which retrives data from Sybase and display the fields. There is this one numeric field of type Numeric(9,0), and iReport automatically assigned it as java.lang.Double. The result is that a float number, instead of an integer, is displayed on my report (45.0 vs. 45). Is there anyway to convert the float/double to integer (I can't change datatype in the database).

 

Thank you,

dsyliu

 

 

 

 

By: Giulio Toffoli - gt78

RE: Numeric Format

2003-07-10 09:27

Use this expression for the textfield that contains your field:

 

new Integer( (int)$F{YouDoubleField}.doubleValue() )

 

Another way is use the patter String.

Try this:

#,##0

 

Giulio

Link to comment
Share on other sites

  • Replies 0
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

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...