aspx thread: RE: Logon Error in Crystal Reports (using SQL Server)
in A SP.NET
I tried your code but still getting the same login failed error
Dim crReportDocument As New ReportDocument()
Dim crTable As Table
Dim crTableLogOnInfo As CrystalDecisions.Shared.TableLogOnInfo
Dim crConnectionInfo As New ConnectionInfo()
crReportDocument.Load("C:\Inetpub\wwwroot\jkTest\rpt1.rpt")
CrystalReportViewer1.ReportSource = crReportDocument
CrystalReportViewer1.DataBind()
'With crConnectionInfo
' .ServerName = "Crash"
' .DatabaseName = "InfoSys"
' .UserID = "WARREN_Intranet"
' .Password = "CECWEB"
'End With
crTableLogOnInfo = crReportDocument.Database.Tables(0).LogOnInfo
crTableLogOnInfo.ConnectionInfo.ServerName = "Crash"
crTableLogOnInfo.ConnectionInfo.UserID = "WARREN_Intranet"
crTableLogOnInfo.ConnectionInfo.Password = "CECWEB"
crTableLogOnInfo.ConnectionInfo.DatabaseName = "Infosys"
crReportDocument.Database.Tables(0).ApplyLogOnInfo
(crTableLogOnInfo)