2006 IR Open Discussion Posted August 19, 2006 Share Posted August 19, 2006 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 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