Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

"Logon Failed" error message. ver 9

Status
Not open for further replies.

Deam

Programmer
Oct 10, 2000
68
US
I have created a crystal report which renders it's data from a stored procedure. The stored proc. resides on my machine (localhost) and i have tested the connections.

However, when i try to view the report in CrystalRepoprtViewer on my ASP.Net page, i get a "Logon Failed" error. My code is:

Dim tbCurrent As Table
Dim tliCurrent As New TableLogOnInfo
Dim pvReqTyp As New ParameterValues
Dim pvReqTypPatt As New ParameterDiscreteValue

reportDocument1.Load(strReportName)

pvReqTypPatt.Value = "Scheduled"
pvReqTyp.Add(pvReqTypPatt)
reportDocument1.DataDefinition.ParameterFields("@reqTypName").ApplyCurrentValues(pvReqTyp)
'Log the report onto the Database
For Each tbCurrent In reportDocument1.Database.Tables
tliCurrent = tbCurrent.LogOnInfo
With tliCurrent.ConnectionInfo
.ServerName = "localhost"
.UserID = "sa"
.Password = "sa"
.DatabaseName = "ACA_BatchSched"
End With
tbCurrent.ApplyLogOnInfo(tliCurrent)
Next tbCurrent

CrystalReportViewer1.ReportSource = reportDocument1

reportdocument1 is an instance of the reportdocument object and the stored proc contains 1 parameter.

The error is:
Exception Details: CrystalDecisions.CrystalReports.Engine.LogOnException: Logon failed.

Any help is greatly appreciated !!!
Cheers.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top