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

[solved] Feeding JasperReport Library only via parameter with data


evaluat0r
Go to solution Solved by lucianc,

Recommended Posts

Hi!

Im evaluating a suitable report engine for my project. The JasperReport library looks promizing.

I've read that it is possible to feed the data from different data sources and to set "some" data via parameter. 

In my case I'd like to prevent the report library to access the database directly. I have a centralised business layer. The report engine gets "executed" from this layer. I also would like to feed the data from the business layer. So is it possible to bring all data to the JasperReport library as parameters?

thank you!

Link to comment
Share on other sites

  • Replies 2
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

  • Solution

JasperReports can use a list of Java beans or generic maps as data source, see JRBeanCollectionDataSource and JRMapCollectionDataSource in the javadocs.  A data source is passed to the report via the REPORT_DATA_SOURCE parameter.

In addition to the built-in data source implementations, you can easily write your own.

Regards,

Lucian

Link to comment
Share on other sites

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