Dim cryRpt As New ReportDocument()
Dim crtableLogoninfos As New TableLogOnInfos()
Dim crtableLogoninfo As New TableLogOnInfo()
Dim crConnectionInfo As New ConnectionInfo()
Dim CrTables As Tables
cryRpt.Load(MapPath("CrystalReport.rpt"))
crConnectionInfo.ServerName = "ICELand"
crConnectionInfo.DatabaseName = "MiniOPT"
crConnectionInfo.UserID = "sa"
crConnectionInfo.Password = "121212"
CrTables = cryRpt.Database.Tables
For Each CrTable As CrystalDecisions.CrystalReports.Engine.Table In CrTables
crtableLogoninfo = CrTable.LogOnInfo
crtableLogoninfo.ConnectionInfo = crConnectionInfo
CrTable.ApplyLogOnInfo(crtableLogoninfo)
Next
CrystalReportViewer1.ReportSource = cryRpt
CrystalReportViewer1.RefreshReport()
ปัญหา Crystal Report การส่งค่า Username/Password บน SQL Server 2005/2008 กับ ASP.NET