Link to home
Start Free TrialLog in
Avatar of Contento1
Contento1Flag for Sweden

asked on

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
--------------
spGetMainReportData

SubReports
-------------
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!
ASKER CERTIFIED SOLUTION
Avatar of Mike McCracken
Mike McCracken

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start 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}.

HTH

frodoman
Avatar of Mike McCracken
Mike McCracken

Glad i could help

mlmcc