Jump to content

Recommended Posts

Posted

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?
  • Replies 3
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Posted

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.

  • 2 weeks later...
Posted

I've got another method by controling in java code:

define this field as String

override the getFieldValue(JRField paramJRField) in your relative dataSource class

when you get the value in your java code ,you can convert them to a string.

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