By adding a single line marked as red u can solve the problem
Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
'Put user code to initialize the page here
Dim crTableLogoninfos As New TableLogOnInfos
Dim crTableLogoninfo As New TableLogOnInfo
Dim crConnectionInfo As ConnectionInfo
Dim crReportDocument As New testRpt
crTableLogoninfos = New TableLogOnInfos
crTableLogoninfo = New TableLogOnInfo
crConnectionInfo = New ConnectionInfo
With crConnectionInfo
.ServerName = "MyComputerName"
.DatabaseName = "NorthWind"
.UserID = "sa"
.Password = "password"
End With
crTableLogoninfo.ConnectionInfo = crConnectionInfo
crTableLogoninfo.TableName = "Place your table name Here"
crTableLogoninfos.Add(crTableLogoninfo)
CrystalReportViewer1.LogOnInfo = crTableLogoninfos
CrystalReportViewer1.ReportSource = crReportDocument
CrystalReportViewer1.DataBind()
End Sub
Abhishek
[email protected]