G
Guest
dear ...
I'm using crystal reports 8.5 with vb.net ... and my problem is that when a
larg number of parameters passed to the report, using this code :
Private Sub ReportsViewer2_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load
Me.CrystalReportViewer1.ReportSource = source
Dim myArrayList As ArrayList = New ArrayList
For Each obj As Object In arrayObj
myArrayList.Add(CStr(obj))
Next
Dim myParameterFields As ParameterFields =
CrystalReportViewer1.ParameterFieldInfo
SetCurrentValuesForParameterField(myParameterFields, myArrayList)
End Sub
Private Sub SetCurrentValuesForParameterField(ByVal myParameterFields As
ParameterFields, ByVal myArrayList As ArrayList)
Dim currentParameterValues As ParameterValues = New ParameterValues
For Each submittedValue As Object In myArrayList
Dim myParameterDiscreteValue As ParameterDiscreteValue = New
ParameterDiscreteValue
myParameterDiscreteValue.Value = submittedValue.ToString()
currentParameterValues.Add(myParameterDiscreteValue)
Next
Dim myParameterField As ParameterField = myParameterFields(paramName)
myParameterField.CurrentValues = currentParameterValues
End Sub
when the number of Items in myArrayList is large_ for example 100 item_ I
got this error message from crystal report when its trying to open the report:
"failed to open a rowset"
waiting for your help
I'm using crystal reports 8.5 with vb.net ... and my problem is that when a
larg number of parameters passed to the report, using this code :
Private Sub ReportsViewer2_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load
Me.CrystalReportViewer1.ReportSource = source
Dim myArrayList As ArrayList = New ArrayList
For Each obj As Object In arrayObj
myArrayList.Add(CStr(obj))
Next
Dim myParameterFields As ParameterFields =
CrystalReportViewer1.ParameterFieldInfo
SetCurrentValuesForParameterField(myParameterFields, myArrayList)
End Sub
Private Sub SetCurrentValuesForParameterField(ByVal myParameterFields As
ParameterFields, ByVal myArrayList As ArrayList)
Dim currentParameterValues As ParameterValues = New ParameterValues
For Each submittedValue As Object In myArrayList
Dim myParameterDiscreteValue As ParameterDiscreteValue = New
ParameterDiscreteValue
myParameterDiscreteValue.Value = submittedValue.ToString()
currentParameterValues.Add(myParameterDiscreteValue)
Next
Dim myParameterField As ParameterField = myParameterFields(paramName)
myParameterField.CurrentValues = currentParameterValues
End Sub
when the number of Items in myArrayList is large_ for example 100 item_ I
got this error message from crystal report when its trying to open the report:
"failed to open a rowset"
waiting for your help