The SP is a cursor that walkes through data to verify information, builds a temp table, Adds more info, then selects the temp table. The Parameters passed to the sp are @beginTS, @endTS @AgentID.
Main Topics
Browse All TopicsI am working on a project that uses an .ADP file and SQL 2000
The report with the problem includes a subreport. I have set the Master/Child Links to the controls on the master and child reports.
The Queries for these reports are stored Proc's and have input parameters.
The main report's SP is not "searchable" by Access so the fields list does not populate. The main report works and the subreport works, but the subreport shows all records instead of the ones that match the linked fields.
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
The report is grouped by person. The subreport is showing records for all the people in the report and not just the person for this part of the report.
I temporarily hardcorded the dates to see if that would work. Nope. Then I got rid of the SP and copied the SQL into the recordsource. I had to hard code the Input parameters, and it worked.
What about my SP does the report not like? I still need to use input parameters for the subreport, How do i How that?
It's very hard to say without the specifics of your reports and your stored procedures. Also you said that subreport is showing all records rather than the group section, so it's not obvious how they could be linked to begin with.
Maybe you could somehow separate your report and subreport into a separate adp and upload it here, with the script for your stored procedure and involved table(s).
Normally you specify stored procedure's parameters as Input Parameters of the form or report:
s.p:
create procedure mysp(@parm1 int, @parm2 int)
subreport: input parameters property:
@parm1 int = reports!MyParentReport!fie
There's also another, undocumented, method: if the parameters in the s.p. are named exactly like the fields in the parent form or report, i.e. in the above example not @parm1 and @parm2 but @field1 and @field2, then they are taken automatically, even without being specified in Input Parameters.
I have overly simplified this so that i can figureout what is the problem.
I created a blank report. in the record source I put:
SELECT * FROM Activity WHERE (TimeStamp BETWEEN @BeginTS AND CONVERT(DATETIME, '2008-11-30 00:00:00', 102))
Now the Input Parameters property shows: "? = BeginTS" I tried to change this to @BeginTS DateTime = '11/1/2008' but it reverts back. how do i set the input parameters?
ok, so now I changed the recordsource to accept 3 parameters. The subreport works if i remove all of the grouping in the subreport. But if i leave the subreport alone, I get this error:
Column (theDate) was used in a calc expression but is not defined in the rowset.
Why is the main report stopping the subreport from grouping?
Business Accounts
Answer for Membership
by: vadimrapp1Posted on 2008-11-21 at 12:58:40ID: 23016977
Parent/child thing works by Access injecting "WHERE" in the record source for the child object according to the parent. If the record source is a view or sql statement, Access parses it and knows how to insert WHERE. But if it's s.p., naturally, it can't.
If your stored procedure is nothing but one statement, put it as the report's record source. If it's too big, create a view. If it's not possible, then specify stored procedure's parameters based on the fields in the parent report.