0

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()
1
Contributor
2
Replies
3
Views
7 Years
Discussion Span
Last Post by swathys
0

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

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.