[Last Call] Learn about multicloud storage options and how to improve your company's cloud strategy. Register Now


Subreports and TTX files

Posted on 2004-10-25
Medium Priority
Last Modified: 2008-01-16
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!
Question by:Contento1
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
LVL 101

Accepted Solution

mlmcc earned 2000 total points
ID: 12400429
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

LVL 42

Expert Comment

ID: 12402404
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}.


LVL 101

Expert Comment

ID: 12417749
Glad i could help


Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Crystal Reports: 5 Tests for Top Performance It is complete, your masterpiece report.  Not only does it meet your customer’s expectations, it blows them out the water, all they want is beautifully summarised and displayed in a myriad of ways. …
I hate sub reports and always consider them the last resort in any reporting solution.  The negative effect on performance and maintainability is just not worth the easy ride they give the report writer.  Nine times out of ten reporting requirements…
In this video, Percona Solutions Engineer Barrett Chambers discusses some of the basic syntax differences between MySQL and MongoDB. To learn more check out our webinar on MongoDB administration for MySQL DBA: https://www.percona.com/resources/we…
In response to a need for security and privacy, and to continue fostering an environment members can turn to for support, solutions, and education, Experts Exchange has created anonymous question capabilities. This new feature is available to our Pr…
Suggested Courses

650 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question