Data Connectivity
 Crystal Reports Forum : Crystal Reports for Visual Studio 2005 and Newer : Data Connectivity
Message Icon Topic: Passing Parameters through code to Report Post Reply Post New Topic
Author Message
baselit
Newbie
Newbie


Joined: 28 Apr 2008
Location: Kazakhstan
Online Status: Offline
Posts: 2
Quote baselit Replybullet Topic: Passing Parameters through code to Report
    Posted: 28 Apr 2008 at 7:44am
Dear All,
 
How can i pass parameteres (collection) through code to reports?
 
I have connect the report with Stored Procedure and it needs two parameters, how can i set the parameters for them?
 
 
 
Thanks in advance...
Basel
 
 
IP IP Logged
jkwrpc
Senior Member
Senior Member


Joined: 19 Jun 2007
Location: United States
Online Status: Offline
Posts: 432
Quote jkwrpc Replybullet Posted: 28 Apr 2008 at 11:49am

There are a number of ways to do what you want. You could create parameters in CR and then pass your values against the parameter collection. I believe you need to make sure the order of your passed values match the order of the parameters. You can use the selection formula and pass the value in using {reportdatafield} = passed parameter1 and {reportdatafield2} = passed parameter1 . You need to make certain the datafields are in the fields you are selecting and the syntax is correct. You could create a SQL select statement in code and pass the variables to it then load the results into a dataset.

I am probably missing other ways, but this will hopefully give you some choices to consider against your report design.
 
Hope this helps.
 
Regards,
 
John W.
IP IP Logged
baselit
Newbie
Newbie


Joined: 28 Apr 2008
Location: Kazakhstan
Online Status: Offline
Posts: 2
Quote baselit Replybullet Posted: 28 Apr 2008 at 1:52pm
yeah nearly i have understand what you mean.
 
 
but can you please provide me with a sample code of this, because really i'm new on Crystal Rports.
IP IP Logged
medmondson
Newbie
Newbie


Joined: 31 Jan 2008
Location: United States
Online Status: Offline
Posts: 2
Quote medmondson Replybullet Posted: 07 May 2008 at 7:28am
The following article shows an easy method of accomplishing this task:
 
 
I dream of .Net!
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.016 seconds.