Report Design
 Crystal Reports Forum : Crystal Reports for Visual Studio 2005 and Newer : Report Design
Message Icon Topic: SubReport Passing Parameters Post Reply Post New Topic
Author Message
noed7879
Newbie
Newbie


Joined: 08 Nov 2008
Online Status: Offline
Posts: 2
Quote noed7879 Replybullet Topic: SubReport Passing Parameters
    Posted: 08 Nov 2008 at 1:04pm
HI!  Can somebody help me with the parameters?
 
I got a Main and Sub Report in the Report.
 
In the Main Report I got a Parameter called {?BeginDate} and {?EndDate}.  I used this to get the specific records within the date range in the main report... I want to use or pass selected the selected date from MainReport and use it in SubReport so that I can get the specific records too with that date range....How can I do that?  I really appreciate the help....Thanks!


Edited by noed7879 - 08 Nov 2008 at 1:10pm
IP IP Logged
BernieHunt
Newbie
Newbie


Joined: 03 Apr 2007
Location: United States
Online Status: Offline
Posts: 21
Quote BernieHunt Replybullet Posted: 09 Nov 2008 at 7:05pm
Wouldn't it be alot easyer to filter your date in code at the dataset level before you hand it off to Crystal? You wouldn't even have to worry about the Cyrstal parameters and the operation would be much quicker in code than waiting on Crystal to do the filtering.
 
Bernie
 
IP IP Logged
noed7879
Newbie
Newbie


Joined: 08 Nov 2008
Online Status: Offline
Posts: 2
Quote noed7879 Replybullet Posted: 10 Nov 2008 at 7:09pm
Thank you so much for answering my question.  Yes it would be more easier if I do that, but, The process that we have is to do everything in crystal....No filtering outside the crystal...We're using ODBC connection to get the data and then deploy the CR report to different locations, so whenever someone open and run the report he don't need to run the outside process to get the records.  We're using ODBC connection so he can run the reports wherever we put the reports and connect the tables thru ODBC. 
 
One more question, Can I pass a parameter from Main report to Sub-Report? Or it's just the sub-report can pass parameters to Main report?
 
 
Thanks and I aprreaciate it!
 
IP IP Logged
hilfy
Admin Group
Admin Group
Avatar

Joined: 20 Nov 2006
Online Status: Offline
Posts: 3702
Quote hilfy Replybullet Posted: 11 Nov 2008 at 4:13pm
This is actually not all that difficult.
 
1.  Use the parameters in your subreport links to link to the date fields in the subreport.  This will get the parameters into the subreport.
 
2.  Edit the Selection Criteria in the subreport so that the parameters don't have the date field = to the parameters, but between the parameters.
 
-Dell
IP IP Logged
Post Reply Post New Topic
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum



This page was generated in 0.000 seconds.