Subreports and TTX files

I have an ASP application that uses the CRViewer to display a report.
The report uses three subreports.
The main report and sub reports are all connected to TTX files (one for each report/subreport).
At run time I call a stored procedure (from the asp page) for each of the reports/subreports:

Main Report

spGetSubreport1Data 'MainReportID'
spGetSubreport2Data 'MainReportID'
spGetSubreport3Data 'MainReportID'

When I run the report the main report displays one page per record from 'spGetMainReportData', but the subreports display the same info on every page (info from the first record of the main report).

If I don't filter the sub report data with the stored procedures.
Is there any way that I can link the subreports to a value in the main report to filter the subreports so it displays the correct info on every page?
How do I do that?

Thanks for any help!
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Link subreport to main report

Open the report
Right click on the subreport
Select a field in the main report
Select the corresponding field in the subreport


Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Note this will only work if you've placed your subreport inside the details or group section of your main report (if it's in the main report's header or footer section then the link will only pass the first or last record).

Make sure the subreport field you select is the parameter that's being passed to your stored procedure.  Also you'll want to select the one that looks like {?ParameterName} not the one like {?PM - ParameterName}.


Glad i could help

It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Crystal Reports

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.