Print Page | Close Window

Linking parameters between main and sub-report

Printed From: Crystal Reports Book
Category: Crystal Reports for Visual Studio 2005 and Newer
Forum Name: Report Design
Forum Discription: The best way to design a report and problems you have encountered
URL: http://www.crystalreportsbook.com/forum/forum_posts.asp?TID=17708
Printed Date: 05 Apr 2025 at 5:40am


Topic: Linking parameters between main and sub-report
Posted By: avallone
Subject: Linking parameters between main and sub-report
Date Posted: 08 Oct 2012 at 6:25am

I am using Crystal Reports for Net 4.0.

 

My Main report and my sub-report and based on two different stored procedure. They both use the same parameter SubmissionControlId. The value of SubmissionControlId is not passed back to main report only to the sub-report. I want to link the values so that whatever value is passed to SubmissionControlId in the main report is also used when the sub-report stored procedure is called.

 

I cannot get the syntax correct. I think I need to use shared variables but I’m not sure how.

 

 



-------------
Bob Avallone



Replies:
Posted By: hilfy
Date Posted: 09 Oct 2012 at 10:26am
If these are parameters, you're not going to use shared variables.  Instead, in the report design you need to go to the Subreport Link and do the following:
 
- In the top, select the SubmissionControlId parameter from the main report.
- In the bottom, turn off "Select data in subreport based on field:".  To the left of that, drop down the list of Subreport Parameters and select the one for the SubmissionControlID.
 
This will link the parameter from the main report to the parameter in the subreport.
 
-Dell


-------------
Proviti, Data & Analytics Practice
http://www.protiviti.com/US-en/data-management-advanced-analytics - www.protiviti.com/US-en/data-management-advanced-analytics



Print Page | Close Window