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
                CrystalReportViewer1.ReportSource = rpt


does any1 knows how to solve this !

i still have problem even i have set the parameter.what goes wrong with the parameter can anyone guide me....

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.