Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Grouping within Subreport does not limit records!

Status
Not open for further replies.

NattyCat

MIS
Aug 9, 2004
38
GB
Crystal 9, SQL Server 7.

Hi,

I'm creating a report showing information about employees who have been transferred from one payroll to another.

In the main report, i'm showing the information for the "FROM" contract/payroll as:

Contract number (from)
Payroll number (from)
Payroll name (from): etc

I am then using a subreport to show the "TO" information as:

Contract number (to)
Payroll number (to)
payroll name (to)
Employee name (to)
national insurance number (to)

the main report and subreport are linked in the unique employee id, and the data in the main report has been grouped so that I only get ONE line of payroll information, rather than it being repeated for each line in the subreport.

I now need to enter a group in the subreport, so that the repeated information (like company name, payroll name, payroll number) is only shown once, with a list of all the employees and their national insurance number showing below.

What I would like to achieve is the following:

From: (will display above "from" info on one line
To: (will display "to" info on one line

employee name national insurance number.


It makes perfect sense to me that all I would need to do is insert a group in the subreport - move the repeated information into that group - and then that will return ONE line of summary info (like the company name, payroll name etc) and several lines for the employees.

However, the grouping in the subreport is not working. no matter WHAT i group on and where I move the data, ALL of the fields in the subreport are repeated. EVEN if i place the information in the REPORT HEADER - i get a line for each employee showing repeated data.

Am at a loss. I have tried creating a fake page header in the subreport - yet it just acts like one continuous detail line. I have moved the subreport into several of the group footers of the main report - but it does the same thing.

Any ideas?
 
I think the groups in both the main and subreports should be on contract number (or payroll name or number--not sure whether these are unique to the contract number), and that the link between the subreport and main report should be on this same field, NOT on employee. The subreport should be placed in the group header or footer in the main report.

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top