Jump to content
Changes to the Jaspersoft community edition download ×

JavaBean Datasource

2005 IR Help

Recommended Posts

By: sznajderman - fabszn

JavaBean Datasource

2005-03-14 02:32



Is it possible to externalize the query from the report?

I would like execute my query in the java code and give the result to the jasper report engine?


there is any possibility?


Thanks for your help.








By: Tbozu - tbozu

RE: JavaBean Datasource

2005-03-16 17:06

sure.. use the JRDataSource. An implementation of JRDataSource is the JRBeanCollectionDataSource.

An example is:

JRBeanCollectionDataSource con1 = new JRBeanCollectionDataSource(result1);

jasperPrint = JasperFillManager.fillReport(jasperReport, parameters, con1);


where result1 is the result of your query which is a collection

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