Subreports

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
 
M

MichaelRay via AccessMonster.com

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top