cancel
Showing results for 
Search instead for 
Did you mean: 

Passing Variable parameter from Visual Studio to Crystal

Former Member
0 Kudos

Hello All,

I am trying to pass a parameter variable created in Visual studio to crystal report located on another machine. The report is a stand alone and the query is generated using "Add Command", I am pulling all the data from VS data set using select *, now I need to pull that variable which was created in VS into the crystal report. PLease help me.

Thank you

Accepted Solutions (1)

Accepted Solutions (1)

former_member183750
Active Contributor
0 Kudos

Always make sure you provide enough information. See the [Rules of Engagement|https://www.sdn.sap.com/irj/sdn/wiki?path=/display/home/rulesofEngagement]

Step 2 Asking Your Question; Provide Enough Information

To at least start, here are the basic info I need:

1) What version of Crystal Reports are you using?

2) What version of .NET are you using?

3) From your description, it sounds like you either have a set of data that you'd need to pass to Crystal Reports as a dataset, or if this is a single value, you'd have to pass it to an pre-existing formula or a text box. Need more info here...

If you are using a dataset see if this will do the trick:

explicitly

crReportDocument.Database.Tables(0).SetDataSource(dataSet.Tables("NAME_OF_TABLE"))

implicitly

crReportDocument.SetDataSource(dataSet) or crReportDocument.SetDataSource(dataSet.Tables(0))

For more info, see the [Crystal Reports For Visual Studio 2005 Walkthroughs|https://www.sdn.sap.com/irj/boc/index?rid=/library/uuid/2081b4d9-6864-2b10-f49d-918baefc7a23&overridelayout=true] article, page 332. (this article will apply to most versions of CR)

Ludek

Answers (0)