Jump to content
Changes to the Jaspersoft community edition download ×

report with one record on more pages


l_ionesco

Recommended Posts

Hello, I have the following situation: one table "departments" with more fields and one table "peoples" with more fields, one field is the department that belongs people. Problem: I need to build a report which contains for each people the departments data and people's data: eg. if we have "Department 1" with "People 1", "People 2"  and " "Department 2" with "People 3" then the report must be: 

 

Header: Department 1 data

Detail: People 1 data

Header: Department 1 data

Detail: People 2 data

Header: Department 2 data

Detail: People 3 data

Solutions that did not work:

1. Create master report with data source "department" table, put in header data from department, create subreport with data source "peoples" table, one record /page. Solution is ok if it fits one single page / record. In our case there are more pages / people. I try to create more detail bands but generates fill error.

2. Create group, put in group header the departments data and in details people data (subreport or not). It is not good for me, I want each people in report to have the department data before.

I use iReportDesigner 5.6.0, DataBeans connection.

Any suggestions, thank you very much.

Link to comment
Share on other sites

  • Replies 3
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Thanks for the reply. If I use two lines (without sub-report)I must have a data-source with department data for each people record. For example: people 1 must have attached department 1 data, people 2 must have same department 1 data again etc. I think I have a redundancy in stored data...
Link to comment
Share on other sites

I found a solution for my problem: create group with $F{people_name} (or id, or something that identify people) in group expression. In header group put department data  and in details people data - build more details bands for more pages - and CHECK "Start on a new page" in group properties. That works for me.

Link to comment
Share on other sites

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