FYI Crystal Reports and MS Access "Logon Failed"

Pete (BSC)

Well-known member
Joined
Oct 19, 2007
Messages
89
Programming Experience
10+
Err Msg: "Logon failed…" when connecting to Access database in .NET application

This is useful when you use the pull method and develop your report against one database (path) and deploy it to a different path (or database name).

If you are using the push method (using the SetDataSource method) this is a non-issue.

Sample from the URL:
VB.NET:
Imports CrystalDecisions.CrystalReports.Engine

Dim crReport As New ReportDocument
Dim crTable as Table
crReport.Load(Application.StartupPath & "\myReport.rpt")

For Each crTable in crReport.Database.Tables
   crTable.Location = Application.StartupPath & "\myDb.mdb"   '<---- reset the path for each table.
Next crTable
 
Back
Top