Skip to Content
0
Former Member
May 07, 2007 at 05:59 PM

Passing a value to a Parameter Field From a VB Form

189 Views

Post Author: as1971

CA Forum: General

Hello everyone

I'm using Visual Basic 6.0 and Crystal Report 9.0

I built a report using Crystal Report and named it Player_Statement.rpt. I then included it to my VB project and named it Player_Statement.Dsr

In this report I have a Parameter Field called P_Player_ID which I'm using in Record Selection Formula.

I'm using the following code to pass a value to the parameter:

Dim Report As CRAXDRT.ReportSet Report = New Player_StatementReport.ParameterFields.GetItemByName("P_Player_ID").AddCurrentValue CLng(cmbPlayerNB.BoundText)

When I execute the application I get the error message "The value or range you are adding has already existed" at the last line of code (Where I'm assigning the parameter a value)

Could anybody help me please