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

problem displaying multiple nested java.util.lists in subreports


nstonebraker

Recommended Posts

I'm not sure what I'm doing wrong here, so if anyone could point me in the right direction I'd be greatly apppreciative.  I'm running iReports(5.5 I believe) and I have sample data beans + factory jarred and included in iReports classpath.

I'm trying to display multiple nested lists in subreports(eg. company -> employee_list -> phone_list).  The report setup looks like this...


Main (Company info)

  • Main details section - Subreport1(company.employee_list)
    • Subreport1 details section - Subreport2(employee.phone_list)
      • Subreport2 Details section - phone number field

I'm passing data to the subreports like this...   new net.sf.jasperreports.engine.data.JRBeanCollectionDataSource($F{employee_list}).  Each subreport is created the details section of its parent, and only the main report has any fields outside of details.

The problem I have is my report is rendering all the phone numbers under the first employee and then the remaining employees are rendered at the end with no phone numbers like this....

Company XYZ

  • Bob
    • ​555-1234
    • 555-1236
    • 555-1237
    • 555-1238
    • 555-1239
    • 555-1240
    • ...
  • ​Joe
  • Susan
  • Mike

What am i doing wrong?  I tried puting the employee / phone number fields in various different bands to no avail.  Im sure its probably something trivial

Link to comment
Share on other sites

  • Replies 0
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

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