Solved

Subreports and TTX files

Posted on 2004-10-25
822 Views
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
--------------
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!
0
Question by:Contento1
    3 Comments
     
    LVL 100

    Accepted Solution

    by:
    Link subreport to main report

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

    mlmcc
    0
     
    LVL 42

    Expert Comment

    by:frodoman
    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
    0
     
    LVL 100

    Expert Comment

    by:mlmcc
    Glad i could help

    mlmcc
    0

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    The Complete Ruby on Rails Developer Course

    Ruby on Rails is one of the most popular web development frameworks, and a useful tool used by both startups and more established companies to build strong graphic user interfaces, and responsive websites and apps.

    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…
    Hot fix for .Net Crystal Reports 10.2.3600.0 to fix problems with sub reports running on 64 bit operating systems ISSUE: Reports which contain subreports fail with error "Missing Parameter Value" DEPLOYMENT SERVER OS: Windows 2008 with 64 bi…
    Hi everyone! This is Experts Exchange customer support.  This quick video will show you how to change your primary email address.  If you have any questions, then please Write a Comment below!
    Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…

    933 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

    Need Help in Real-Time?

    Connect with top rated Experts

    16 Experts available now in Live!

    Get 1:1 Help Now