How to use Java Beans as Datasource in Ireport?

Can we use Java beans as data source to ireport?

Java beans can be added as data source to ireport.. Follow these steps to add java beans.

1. Select Options → Class path


2.Add the jar having the compiled class files of the Java bean to be used.
3.Select Data → Report Query → JavaBeanDataSource

4. In ClassName give the Classname along with Package name → Read attributes .
5. Fields will be resulted as shown in the above fig.
6. Then these fields can be included in the design as it is.
7. Note : When invoking the report from application

No comments:

Post a Comment

Page copy protected against web site content infringement by Copyscape