edilmar Posted September 23, 2011 Share Posted September 23, 2011 Hi,Environment: Jasper+iReport 4.0.1 + NB7.0.1 + Hibernate3 + JSF2 project.For example, I have a simple report with customers. But each client have many accounts to pay, opened, and I need to show only the accounts respecting many filters (like init/final dates, status, type, etc). If I did using only JDBC, I configured the accounts subreport to use the same Connection from main report and wrote a SQL to process the data, passing all filter options with parameters.But now that I use Hibernate/JSF, I need to pass a list of objects to the report. For main report, it is easy to call a DAO to process the customers need and to return a list of customers. But for subreport I have some doubts:1) I can't share a Connection, there isn't a Connection. And I don't know if in this case it is possible to create a Data Source Expression.2) I don't know how to filter the list of "objects accounts to pay", using the parameters. I didn't find in internet a complex sample for subreports. I find only sample reports like "customers + phones", without filtering the subreport.Thanks for any help. Link to comment Share on other sites More sharing options...
edilmar Posted October 25, 2011 Author Share Posted October 25, 2011 For a while I use the following "plan B": subreport with normal SQL, pass parameters from main report, including the Connection extracted from EntityManager/Session Hibernate. Then, my report is more and less OO and SQL. 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