Jump to content

getting passed datasource items


2004 IR Help

Recommended Posts

By: mlaw93 - mlawson93

getting passed datasource items

2005-09-07 13:55

Okay, there is no specific example that does this, so if someone could tell me how to do it I would be grateful.

 

I have a JRBeanCollectionDataSource that is passed to my main report.

Lets say it contains a collection of Department beans.

Each department object contains a collection named "people" of Person beans.

 

Now, if my main report wants to pass the list of Person objects to the subreport, how would I do that?

 

I tried creating a Data Source Expression to pass this info from the main report to the subreport, like this:

new net.sf.jasperreports.engine.data.JRBeanCollectionDataSource((Collection) $F{people})

 

But now I can't figure out how to get the person.firstName, person.lastName items out of each Person bean in the collection that was passed.

 

Help please!

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