2001 JI Open Discussion Posted August 21, 2006 Share Posted August 21, 2006 By: roshansalvi - roshansalvi How to Use Beans with Jasper Report? 2005-03-02 23:20hello everyone! i m using Jasper report and iReport as it's visual editor, passing parameters and calling Jasper Report through java file is also working fine. But i want to use Enterprise Bean in Jasper report As in iReport, there is an option for specifying Bean Class with Query Reporting, so i don't know how to use that option? if anyone knowing this, plz help me out Thank You By: Doug Berkland - berkland RE: How to Use Beans with Jasper Report? 2005-03-29 15:57For each level of beans containing other beans, create a new sub-report level. Pass the secondary collection in a new JRBeanCollectionDataSource as the datasource for the subreport. By: mcalex - mcalexy2k RE: How to Use Beans with Jasper Report? 2005-03-13 22:32Please refere "Data Source" sample in your <jasper installation>demosamplesdatasource reply me if you need more guidelines or help Regards Alex By: roshansalvi - roshansalvi RE: How to Use Beans with Jasper Report? 2005-03-28 19:18Thanks Alex. I have also gone through datasource example. Actually i am using iReport. Again in datasource example it is simple example. i want to pass object tree that is. for eg.. Test contains many subject, each subject contains many question, each question has many options. etc... so how could i achieve this. Please help me out. I will be thankfull to you. i want to know how can i iterate so that if i have collection of object all will be print on report Roshan By: Mertz - mgollogly RE: How to Use Beans with Jasper Report? 2005-04-26 06:19The example data source is'nt clear. I'm trying to pass the results of a query through to the report. The problem being that an array is not dynamic. Do you know if this can implemented as a collection. By: Doug Berkland - berkland RE: How to Use Beans with Jasper Report? 2005-04-26 07:11Instead of the CustomDataSource object, use JRBeanCollectionDataSource instead. Any collection of Java objects with bean-style setters/getters can be passed to the constructor. By: Craig O'Shannessy - shanness RE: How to Use Beans with Jasper Report? 2005-03-13 22:49Also note that due to subreports relying on threading, and the EJB spec mandating that you can't use threads with EJB's, you can't actually use Entity Beans directly on subreports. You will have to convert them into data/value objects first. There are other threads about this (with me at the Author). Search for J2EE threads or EJB threads. I noticed in an email from Marc Fluery (head of JBoss) that Jasper has become part of the "JBoss Open Source Federation", and it seems Jasper (Teodord) has committed to making Jasper intergrate with JBoss. Teodord, does this mean that subreports will be stop using threads? By: Dan Desch - danieldesch RE: How to Use Beans with Jasper Report? 2005-05-05 07:51Craig O'Shannessy wrote: "Also note that due to subreports relying on threading, and the EJB spec mandating that you can't use threads with EJB's, you can't actually use Entity Beans directly on subreports. You will have to convert them into data/value objects first. " I don't think that is exactly right. The restriction in EJB about threads doesn't prohibit a sub thread from using an entity bean, but rather it restricts an entity bean (or session bean or message bean) from starting a new thread. So, I would have said, a sub report can directly (or indirectly) access an entity bean. The entity bean however, can not invoke a sub-report (via, for example, invoking a Jasper fill method). Do I have this right Craig, or do you think the restriction works both ways? Dan Desch Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now