Passing logon info
hi!
I am working with crystal reports in ASP.net and accessing a secured database through the report. My code goes as follows:
Dim myConnection As New ConnectionInfo
Dim myTableLogonInfo As New TableLogOnInfo
Dim myTableLogonInfos As New TableLogOnInfos
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
With myConnection
.ServerName = "servername"
.DatabaseName = "gardenworld"
.UserID = "sa"
.Password = "password"
End With
myTableLogonInfo.ConnectionInfo = myConnection
myTableLogonInfo.TableName = "customers"
myTableLogonInfos.Add(myTableLogonInfo)
CrystalReportViewer1.LogOnInfo = myTableLogonInfos
CrystalReportViewer1.ReportSource = New customer_rpt
End Sub
Although i am passing database logon info through code it gives error "CrystalDecisions.CrystalReports.Engine.LogOnExcep tion: Logon failed". Am i missing something in code?
Thanks and Regards
Sandeep Saran
|