insearchofsunrise Posted November 17, 2014 Posted November 17, 2014 Hello, i have field <field name="value" class="java.lang.String"/>It may contains four kinds of data: Date, Boolean, Number, String How to display it? There is always problem with cast. How tell Jasper to recognize proper type depends of value data?
H Mendoza Posted November 17, 2014 Posted November 17, 2014 Hi there - Have you considered using the Java methods that are available from the Expression Editor? Those methods are powerful and will help you manage your data fields. Let me know.
hozawa Posted November 17, 2014 Posted November 17, 2014 You've defined your field to be of type String so the value will be stored as a String.
65644341 Posted November 27, 2014 Posted November 27, 2014 I've got another method by controling in java code:define this field as Stringoverride the getFieldValue(JRField paramJRField) in your relative dataSource classwhen you get the value in your java code ,you can convert them to a string.
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