Jump to content
We've recently updated our Privacy Statement, available here ×

Table component + Javabean Datasource?


blackflame

Recommended Posts

Hello to everyone,

I'm currently working with IReport 3.7.5. In the past, I successfully created a subreport which datasource is a Java bean throught setting a JRBeanCollectionDataSource as a datasource expression. What I'm trying to do now is something similar using a table component instead of a subreport but I'm not getting any success.

What I do (or at least what I try to) is to create a dataset using the same connection the master report has. Next (the same way I do for the subreports) as a dataset query I use a javabean datasource which value is the bean the factory class is returing, and therefore the fields are now available. Great. Next I create the table and with the dataset I've just created, I add the fields, compile, execute and no data is displayed.

After that I edit the table datasource in order to set a JRBeanCollectionDataSource as a datasource expression with one of the list object the factory is returning. Compile, execute and...no data displayed...even it does not show any header...like the table has never existed.

What am I missing? To summarize: how can I create a table which datasource is a java bean instead of a sql statement?

I'm a little confused about it all. I thought subreports and tables worked more or less the same when talking about datasources but it seems not.

Thanks in advance,
Jordi.

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