thanX for your reply ...
my database is foxpro ... and the case I'm in is that I want the user to
enter the "where" clause of the query, and according to the result of that
query the report will be generated ... for example if I have a report that
shows a list of employees and their details, and the user entered that he
wants those employees with names started with letter "A". My system will get
those employees names, put them in arraylist then send them _as I show in the
first message_ to report as values of a parameter ... I'm wondering if you
have another pattern to do this ...
but for now I found a solution ... to fill those employees in a difined
structure Dataset, then make it the source of the report .... and its working
fine but takes more time ...
anyway thanks again ...... :o)
[quoted text, click to view] "Turkbear" wrote:
> On Sun, 6 May 2007 07:10:00 -0700, Butmah <Butmah@discussions.microsoft.com> wrote:
>
> >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
>
> What database?
>
> Have you tested the report using CR designer to see if it can handle 100 parameters and their values?
>
> I suspect a Crystal limitation ( or the SQL generated by the report object is far too large a string to pass to the
> database)
>
> If 100 parameters are really neded, the data model probably needs work or the report needs to be modified..
>
>