T
Todd
I am baffled by Access's inability to show related records
when the subreport's RecordSource is a stored procedure.
Maybe someone here can shed some time on the subject for
me.
Here's what I have:
My main report's RecordSource is a stored procedure which
returns a recordset including the primary key. This works
great by itself as I use stored procedures almost
exclusively as report recordsources.
Next I have added a subreport to the main report. Its
recordsource is also a stored procedure which returns a
recordset including a primary key that matches the main
report's primary key. I have also included both primary
key fields on both reports. The Link Child Fields and Link
Master Fields have been set appropriately.
When I open the main report the subreport shows ALL the
records for each subreport for each record instead of each
sub-record for each main-record. (O.K. That's not too
clear of a sentence.)
It looks like this:
Main Report Record 1
Sub Report Record 1
Sub Report Record 2
Sub Report Record 3
Main Report Record 2
Sub Report Record 1
Sub Report Record 2
Sub Report Record 3
Main Report Record 3
Sub Report Record 1
Sub Report Record 2
Sub Report Record 3
I want it to look like this:
Main Report Record 1
Sub Report Record 1
Main Report Record 2
Sub Report Record 2
Main Report Record 3
Sub Report Record 3
Now I have made a mock view of my stored procedure for the
subreport and it works correctly. But when I use the
stored procedure, it doesn't. Unfortunately, I cannot use
a simple view in my subreport. I contains parameters and
calls to other procedures in order to render it's
recordset.
Again, I have set the Link Child Fields and Link Master
Fields appropriately, checked for mispellings, etc. This
was my first thought when I ran into this.
when the subreport's RecordSource is a stored procedure.
Maybe someone here can shed some time on the subject for
me.
Here's what I have:
My main report's RecordSource is a stored procedure which
returns a recordset including the primary key. This works
great by itself as I use stored procedures almost
exclusively as report recordsources.
Next I have added a subreport to the main report. Its
recordsource is also a stored procedure which returns a
recordset including a primary key that matches the main
report's primary key. I have also included both primary
key fields on both reports. The Link Child Fields and Link
Master Fields have been set appropriately.
When I open the main report the subreport shows ALL the
records for each subreport for each record instead of each
sub-record for each main-record. (O.K. That's not too
clear of a sentence.)
It looks like this:
Main Report Record 1
Sub Report Record 1
Sub Report Record 2
Sub Report Record 3
Main Report Record 2
Sub Report Record 1
Sub Report Record 2
Sub Report Record 3
Main Report Record 3
Sub Report Record 1
Sub Report Record 2
Sub Report Record 3
I want it to look like this:
Main Report Record 1
Sub Report Record 1
Main Report Record 2
Sub Report Record 2
Main Report Record 3
Sub Report Record 3
Now I have made a mock view of my stored procedure for the
subreport and it works correctly. But when I use the
stored procedure, it doesn't. Unfortunately, I cannot use
a simple view in my subreport. I contains parameters and
calls to other procedures in order to render it's
recordset.
Again, I have set the Link Child Fields and Link Master
Fields appropriately, checked for mispellings, etc. This
was my first thought when I ran into this.