I have gone through the sample apps. from crystal, but I still get the "clucky" parameter popup box.
(Vb.Net Professional Edition 2002)
Here are two different ways I have tried:
Private Sub btnLoad_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnLoad.Click
''Set the viewer to the report object to be previewed.
Cr.ReportSource = crReportDocument
End Sub
Sub Parameters()
''Set the name of the parameter field, this must match a parameter in the report.
paramField.ParameterFieldName = "ClientName"
''Set the discrete value and pass it to the parameter
discreteVal.Value = txtName.Text
paramField.CurrentValues.Add(discreteVal)
''Set the parameter fields collection into the viewer control.
Cr.ParameterFieldInfo = paramFields
End Sub
Private Sub btnLoadReport_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnLoadReport.Click
Call Parameters()
End Sub
**************************************
Dim crParameterFieldDefinitions As ParameterFieldDefinitions
Dim crParameterFieldDefinition As ParameterFieldDefinition
Dim crParameterValues As ParameterValues
Friend WithEvents CrystalReportViewer1 As CrystalDecisions.Windows.Forms.CrystalReportViewer
Dim crParameterDiscreteValue As ParameterDiscreteValue
'''Create an instance of the strongly-typed report object
crReportDocument = New CRParams()
'''Get the collection of parameters from the report
crParameterFieldDefinitions = crReportDocument.DataDefinition.ParameterFields
'''Access the specified parameter from the collection
crParameterFieldDefinition = crParameterFieldDefinitions.Item("clientName"
'''Get the current values from the parameter field. At this point
'''there are zero values set.
crParameterValues = crParameterFieldDefinition.CurrentValues
'''Set the current values for the parameter field
crParameterDiscreteValue = New ParameterDiscreteValue()
crParameterDiscreteValue.Value = (txtName.Text)
'''Add the current value for the parameter field
crParameterValues.Add(crParameterDiscreteValue)
'''All current parameter values must be applied for the parameterfield.crParameterFieldDefinition .ApplyCurrentValues(crParameterValues)
******
Any suggestions on how to get this to work, I must be missing something rather simple.
G