strConnString = ("server=192.168.0.8;User Id=root;password=LbibLydfbNppr;database=datacenter")
Conn = New MySqlConnection(strConnString)
Conn.Open()
sql = "select icd10,icdname1,count(icd10) as cicd10 from opddata where left(icd10,1)<>'Z' and icd10<>'O800' and icd10<>''"
da = New MySqlDataAdapter(sql, Conn)
da.Fill(ds, "dtShop")
myrpt.SetDataSource(ds.Tables("dtShop"))
For i = 0 To 9
myrpt.SetParameterValue("Count", lnCount(i)) 'ถ้าใช้แบบนี้มันจะส่งค่าสุดท้ายของอาเรย์ไปค่ะ
Next
crvOpdShow.ReportSource = myrpt
crvOpdShow.Show()