l_ionesco Posted August 25, 2014 Posted August 25, 2014 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 dataDetail: People 1 dataHeader: Department 1 dataDetail: People 2 dataHeader: Department 2 dataDetail: People 3 dataSolutions 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.
Tom C Posted August 26, 2014 Posted August 26, 2014 You can make two lines in your detail band - one for depetment data ("header"), and the other for people data. Will this work for you to meet the design requirment?
l_ionesco Posted August 26, 2014 Author Posted August 26, 2014 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...
l_ionesco Posted September 2, 2014 Author Posted September 2, 2014 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.
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