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

How to implement a subreport with complex filtering?


edilmar

Recommended Posts

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

  • 1 month later...
  • Replies 1
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

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