Passing multipe values for parameter

K

kurtgambino

I have crysatl report that uses two parameters that can accept multiple
values. Bur any time more than one value is passed to the parameter it
only stores the last one inputed below is the code it self please
advise.


Dim tbCurrent As CrystalDecisions.CrystalReports.Engine.Table
Dim tliCurrent As CrystalDecisions.Shared.TableLogOnInfo

For Each tbCurrent In memberlistingrpt1.Database.Tables
tliCurrent = tbCurrent.LogOnInfo
With tliCurrent.ConnectionInfo
..ServerName = "10.129.1.180"
..UserID = "penuser"
..Password = "penpass"
..DatabaseName = "pensionweb"
End With
tbCurrent.ApplyLogOnInfo(tliCurrent)
Next tbCurrent
showrpt.ReportSource = New memberlistingrpt

Dim sqlda As New SqlDataAdapter("Select distinct corpcode from
corpenroll where loginid = '" + Session("loginid") + "' order by
corpcode", SqlConnection1)

sqlda.Fill(sqlds, "e01_mstr")
Dim sqldr As DataRow
For Each sqldr In sqlds.Tables("e01_mstr").Rows
memberlistingrpt1.SetParameterValue("corp", sqldr.Item("corpcode"))

Next
Dim sqlda1 As New SqlDataAdapter("Select distinct division from
corpenroll where loginid = '" + Session("loginid") + "' order by
division", SqlConnection1)
sqlda1.Fill(sqlds1, "e01_mstr1")
Dim sqldr1 As DataRow
For Each sqldr1 In sqlds1.Tables("e01_mstr1").Rows
memberlistingrpt1.SetParameterValue("division",
sqldr1.Item("division"))

Next

memberlistingrpt1.SetDatabaseLogon("penuser", "penpass",
"10.129.1.180", "pensionweb")

showrpt.DataBind()
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top