hi,
when i run the code below its hit the error Index was outside the bounds of the array. in a place that i highlight in red. Please help
Dim crParameterFieldDefinitions As ParameterFieldDefinitions
Dim crParameterFieldDefinition As ParameterFieldDefinition
Dim crParameterValues As New ParameterValues
Dim crParameterDiscreteValue As New ParameterDiscreteValue
rpt.SetDatabaseLogon("sas", "123")
crParameterDiscreteValue.Value = ReportMenu.ComboBox1.Text
crParameterFieldDefinitions = rpt.DataDefinition.ParameterFields()
crParameterFieldDefinition = crParameterFieldDefinitions.Item("TransactionDate", DateFrm.ToShortDateString())
crParameterFieldDefinition = crParameterFieldDefinitions.Item("TransactionDate2", DateTo.ToShortDateString())
crParameterValues = crParameterFieldDefinition.CurrentValues
crParameterValues.Clear()
crParameterValues.Add(crParameterDiscreteValue)
crParameterFieldDefinition.ApplyCurrentValues(crParameterValues)
CrystalReportViewer1.ReportSource = rpt
CrystalReportViewer1.Refresh()