Jump to content
JasperReports Library 7.0 is now available ×

JRDataSourceProvider using 2nd level fields


markpa

Recommended Posts

Hope the subject is clear. What I am having a problem with is accessing subfields from my datasource.

 

In my example my datasource relates to licences, the Licence class contains a licenceHolder which is of LicenceHolder class.

 

In iReport (1.3.1) the Report Query, using DataSourceProvider lists the fields as expected and shows licenceHolder with the correct Field Type. i.e. ... ws.licensing.LicenceHolder .

 

I need to know how to access the licence holder information, say licenceHolder.familyName.

 

I have tried $F{licenceHolder}.familyName and on compuile I get the field is not visible.

 

Checking the licenceHolder class familyName is private, but so are all the fields in licence which are returned successfully.

 

Do the fields have to be public, or are there other ways in which I should access this data.

 

Have also tried :

$F{licenceHolder}.{familyName} syntax error

$F{licenceHolder}.$F{familyName} Field not found : familyName

$F{licenceHolder.familyName} Field not found : licenceHolder.familyName

$F{licenceHolder.getFamilyName()}

licenceHolder.getFamilyName()

 

OK I've worked it out I need to use

$F{licenceHolder}.getFamilyName()

 

Maybe the post will be of help to someone else.

 

Cheers

 

Mark

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