Print Page | Close Window

How to pass parameter to subreport?

Printed From: Crystal Reports Book
Category: Crystal Reports .NET 2003
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=1352
Printed Date: 28 Mar 2024 at 8:36pm


Topic: How to pass parameter to subreport?
Posted By: SunilKanta
Subject: How to pass parameter to subreport?
Date Posted: 20 Sep 2007 at 5:37am
Hi All,
 
I am passing a parameter called "prmStartupDate" to the main report. I am displaying this parameter in the header part of the main report. I have a subreport called "Employees", now my problem is i need to pass the value of "prmStartupDate" to this subreport through VB.Net code.
 
Can anyone help me in this regard.
 
TIA


-------------
Thanks,
Sunil



Replies:
Posted By: hilfy
Date Posted: 20 Sep 2007 at 2:02pm
You need to add the param to the subreport.  I usually do this by setting up a subreport link to the parameter.  If I don't need the param value in the selection criteria for the subreport, I then remove it from the selection criteria.  This leaves the link set up so that the parameter is sent to the subreport from the main report.  If you do this, I don't think you need to actually set the parameter value for the subreport in your code.
 
-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