Subreports

  • Thread starter Thread starter k-chan
  • Start date Start date
K

k-chan

Hi, I have a subreport in my report, and it only displays data for the
first item and then repeats it.

Let me explain, the main report shows all the people working at a lab,
and the subreport shows data if the person works at some other lab as
well. The data of the main report comes from a stored procedure that
passes back a employee ID. The data of the subreport also comes from a
stored procedure, but it needs the employee ID as a parameter.

So to get the parameter for the subreport, I set it's Input parameter
as [reports][name of mainreport]![name of id field]. But then every
subreport, doesn't matter for which employee it is, it displays the
data for the first employee on the report.

I've set the child and master link both to the last name of the
employee.

I'm not all that familiar with subreports, so I'll need all the help I
could get.

Does anyone know how I could get the subreports to show differently
for each employee on the report?

Thanks,
Kitty
 
Are you saying that you fire the stored procedure for the subreport for each
instance that the ID field appears in the main report? Normally I would base
both report and subreports on queries of linked tables or view in SQL server.
Then if you link the ID fields on main report and subreport the link shoudl
work.

k-chan said:
Hi, I have a subreport in my report, and it only displays data for the
first item and then repeats it.

Let me explain, the main report shows all the people working at a lab,
and the subreport shows data if the person works at some other lab as
well. The data of the main report comes from a stored procedure that
passes back a employee ID. The data of the subreport also comes from a
stored procedure, but it needs the employee ID as a parameter.

So to get the parameter for the subreport, I set it's Input parameter
as [reports][name of mainreport]![name of id field]. But then every
subreport, doesn't matter for which employee it is, it displays the
data for the first employee on the report.

I've set the child and master link both to the last name of the
employee.

I'm not all that familiar with subreports, so I'll need all the help I
could get.

Does anyone know how I could get the subreports to show differently
for each employee on the report?

Thanks,
Kitty
 
Back
Top