Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Subreport cannot be based on stored procedure!

Status
Not open for further replies.

rsbutterfly16

IS-IT--Management
Apr 19, 2007
53
US
I am working on an Access Report that contains two subreports. My main report is based on a stored procedure in my sql server backend as well as an input form for my paremeter,
my problem is that I would like the record source for my first subreport to be based on another stored procedure but i tried using a sql pass thru query and i keep getting the error that i can't base a subreport in a pass thru query. i also try creating a query that insert into a local table in my access database based on my sql pass thru query but how can i make the subreport get the data from the table and the table be updated by my pass thru quey? or is there another easier way to do this?


Any help will be apreciate it!!!
 
have you tried to make another query which just drags everything from the passthrough query and base the report on this new query?

--------------------
Procrastinate Now!
 
hi i tried doing a query in access that select all the columns from the pass thru query and tried using data as the source of the subreport but i keep getting the same error that i can't base a subreport in a pass thru query.
 
how are you with vba?

normally, I would use ADO to pull up a recordset based on the stored procedure, and then set the report's recordset to the recordset created...

however if you don't want to write any code, then you can use a macro to run the query which updates your local table before you open the report

--------------------
Procrastinate Now!
 
Try this on the section that your subreport is in create control with the names of your stored proc prameters

pram name control name
@Customerid Customerid
@StartDate StartDate
@EndDate EndDate
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top