Jump to content
Changes to the Jaspersoft community edition download ×

Custom beans as parameters


2004 IR Help

Recommended Posts

By: Jesse Martinez - sr_jesse

Custom beans as parameters

2004-11-16 12:52

How do I use a custom bean as a parameter.

 

I have a custom bean parameter variable (using java.lang.Object), when I try to compile the report it says that java.lang.Object does not have that method (Ok, fine with me...). So, instead I specify the bean class name on the parameter and include the classes on the classpath. So, I have everything set, but, when I try to compile the report the sax parser gaves me this error: [Attribute "class" with value "com.mycompany.mysystem.model.Card" must have a value from the list "java.lang.Object java.lang.Boolean java.lang.Byte java.util.Date java.sql.Timestamp java.sql.Time java.lang.Double java.lang.Float java.lang.Integer java.io.InputStream java.lang.Long java.lang.Short java.math.BigDecimal java.lang.String "]

 

These only happens in version 0.3.2+, in version 0.3 it was working fine.

 

Can anyone helpme on this...

 

 

 

 

By: Giulio Toffoli - gt78

RE: Custom beans as parameters

2004-11-17 04:18

 

You have to declare the field as java.lang.Object and then cast it to com.mycompany.mysystem.model.Card when you use it:

 

((com.mycompany.mysystem.model.Card)$F{YourBean})

Link to comment
Share on other sites

  • Replies 0
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

Popular Days

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