Jump to content
Changes to the Jaspersoft community edition download ×

How to use java beans in ireport tool


venujasper

Recommended Posts

  • Replies 2
  • Created
  • Last Reply

Top Posters In This Topic

1.For connection as well as for DataSource
.......
write an Java bean class and you must have a factory method in that Bean class
and this static method should return a Collection of Beans/Array of Beans of type of Current Java Bean[i think you know about Factory class] ...
and set this bean .class file path under CLASSPATH in your iReport tool and create a connection and follow below  2nd point to get fields..

2.For Datasource only
......
set this bean .class file path under CLASSPATH in your iReport tool and -> select ReportQuery under Data option
->click JavaBeanDataSource button give the complete pakaged path for your class and select your needed fields...
.....

*I am also new to this and I did like this way only..and let me know whether it is okay or not and is there any alternative?

Link to comment
Share on other sites

Thank you for reply.

           But How to give CLASSPATH dynamically, because i am using web application i need to give the classpath dynamically.

Is there any way to pass the parameters to the CLASSPATH so that i can pass bean class path dynamically using parameters.

Thanks

 

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