Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / SQL Server / ADP / December 2007

Tip: Looking for answers? Try searching our database.

Subreport Oddities

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
RJ - 27 Dec 2007 16:41 GMT
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
Sylvain Lafontaine - 27 Dec 2007 20:03 GMT
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.

Signature

Sylvain Lafontaine, ing.
MVP - Technologies Virtual-PC
E-mail: sylvain aei ca (fill the blanks, no spam please)

> Happy Holidays to all
>
[quoted text clipped - 37 lines]
>
> RJ
RJ - 27 Dec 2007 20:37 GMT
That cleared it!

Thank you for all your help and sharing of your expertise.

RJ

> Delete the InputParameter for the subreport (leave it blank); from my past
> tests, the InputParameter doesn't work properly for subreport.  If the
[quoted text clipped - 43 lines]
> >
> > RJ
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.