Jump to content
Changes to the Jaspersoft community edition download ×

Silly behaviour using JRBeanCollectionDS


2005 IR Help

Recommended Posts

By: Umberto Uderzo - uuderzo

Silly behaviour using JRBeanCollectionDS

2004-12-21 04:04

Hi all...

 

Maybe it's a my stupid mistake (I hope so) but this trouble is going to make me crazy. After switching to JR 0.6.3, I begun to experience silly behaviours on JR using JRBeanCollectionDataSource. I mean, I receive IllegalMethodAccess Exception and a message that tells that it was impossible to retrieve the field value since the getter does not exists. The object class that I use is a simple Javabean with all getters/setters made public.

 

The same report seemed to work well with previous version (0.6.0).

 

Anyone can point me out of this madness?

 

Thanks in advance!

 

 

 

 

By: Teodor Danciu - teodord

RE: Silly behaviour using JRBeanCollectionDS

2004-12-21 04:55

 

Hi,

 

I have made a small modification recently in the

JRBeanCollectionDataSource that might be the cause

of your problem.

This data source now first looks in the field description to see what JavaBean property to use

for retrieving the field data.

If the field description is null, it then uses the field

name as before.

This allows us to retrieve the value for nested

JavaBean properties using dots in the property names.

The field name cannot contain dots, so we use the

field description, if present.

 

I suspect your report fields have a description.

You should remove it, or use the JRBeanCollectionDataSource constructor that

has the boolean parameter.

 

I hope this helps.

Teodor

 

 

 

 

 

By: Umberto Uderzo - uuderzo

RE: Silly behaviour using JRBeanCollectionDS

2004-12-21 06:09

You're right. You saved me the XMas headache. My fields contained a description that equals the fieldName (this should work, right?) but the real problem is that the fields were generated by the editor I'm using (iReport) and nowadays it generates the fields with capital letter both on name and description. Correcting manually those names solved the problem. Now I'll inquiry on iReport to see if there's some fix for this.

 

Thanks again and merry xmas!

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