Subreport Oddities

R

RJ

Happy Holidays to all

I have a report that contains a sub report

The main report has a sp recordsource selecting an entire single table.
The table column EA_EventId is included in the selection and is the logical
link to the sub report.

There is a control on the main report named"EA_EventId" and is bound to the
field EA_EventId. The recordsource is set in the Report_Open Event.

The subreport has an sp recordsource that is as follows

RecordSource: spwr_Srpt_Tasks
Qualifier: dbo
InputParameter: EA_Eventid
This sp works as expected


When I run the report the main report works as expected and the subreport
works fine for the first reported entry.
Lets say the EA_EntryId for the first is 127.
However subsequent calls to the subreport for other Events still uses the
original EA_EventId of 127.

I checked the reported entries on the main report and the original reported
EA_EventId is reported once.

I looked at the Profiler trace and found multiple calls for spwr_Srpt_Tasks
all using the original EA_Eventid of 127.


I ran the report and 2 main report items were listed as expected.
When I checked profiler I saw 4 calls to the subreport sp all using the
FIRST Ea_eventId



Any ideas??? Your help is much appreciated!

RJ
 
S

Sylvain Lafontaine

Delete the InputParameter for the subreport (leave it blank); from my past
tests, the InputParameter doesn't work properly for subreport. If the
parameter for the spwr_Srpt_Tasks procedure is @EA_EventId, then Access
should be able to make the relation with the EA_EventId control on the main
report; even without the InputParameter set for the subreport.
 

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