Hi

I am facing logon Failed problem in VB.Net Crystal Reports after i deployed it at client side...

A window showing Database name, user name, Server and password
I fill it manually still it fails...

Can any one help me to sort out this solution...

Thanks
:)

Dani AI

Generated

This is a very common deployment symptom: the report viewer shows a logon dialog (server/user/password) but manual entry still fails because the report’s saved connection or the client environment doesn’t match what the report expects. and describe the classic case; ’s suggestion to set connection info at runtime is on the right track, but a few additional things are frequently missed and will keep the dialog from accepting credentials.

Key additions to check (things not covered in the original posts)

  • Subreports and any command/tables used by them often retain their own saved connection. Every subreport table must be updated at runtime.
  • The report’s saved table location can include owner/server qualifiers; if that doesn’t match the target server/schema the runtime can reject the credentials.
  • Client machine must have the same DB provider/ODBC/Native client the report was designed with. Missing or wrong drivers make the “database” field appear blank.
  • Bitness mismatch: Crystal and many DB drivers are 32‑bit. If the client app runs as 64‑bit while drivers are 32‑bit, logon will fail.
  • Make sure the same Crystal runtime (the exact redistributable your app was built against) is installed on the client.

Quick troubleshooting flow

  1. From the client, test DB connectivity with the same credentials (SQL Management Studio or a simple connection test).
  2. Confirm the correct data provider/ODBC DSN exists on the client.
  3. Temporarily try a simple report with a single table to isolate subreport/complexity issues.
  4. Programmatically set credentials for every table and every subreport table before assigning the ReportDocument to the viewer (or push a typed DataSet to the report to avoid DB logon).
  5. If using Windows auth, ensure the process identity has DB access or switch to explicit SQL credentials.

Avoid using sa in production and enable exception details/logging during testing to capture the exact failure message. This set of checks resolves the vast majority of deployed “Logon Failed” cases.

Recommended Answers

All 2 Replies

Hi

I am facing logon Failed problem in VB.Net Crystal Reports after i deployed it at client side...

A window showing Database name, user name, Server and password
I fill it manually still it fails...

Can any one help me to sort out this solution...

Thanks
:)

Did you ever get a solution for this. I have a similar problem. When my login comes up the database name is not showing and it does not allow me to input it to login.

Use This Class Make CR Connect:

Public Sub GETSERVERNAMEANDDATABASENAME(ByVal rpt As Object, ByVal DATABASENAME As String) ', Optional ByVal PASSWORD As String = "", Optional ByVal USER As String = "")

Dim I As Integer

Dim TBL1 As New CrystalDecisions.Shared.TableLogOnInfo

TBL1.ConnectionInfo.ServerName = "Typed UR MS SQL Server Name"

TBL1.ConnectionInfo.DatabaseName = DATABASENAME

TBL1.ConnectionInfo.Password = "Type MS SQL sa pass word"

TBL1.ConnectionInfo.UserID = "sa"

For I = 0 To rpt.Database.Tables.Count - 1
rpt.Database.Tables(I).ApplyLogOnInfo(TBL1)
Next I

End Sub

To PreView Report Used This:

Dim rpt As New UR Crystal Report Name

GETSERVERNAMEANDDATABASENAME(rpt, "Data Base Name")

Me.CRviewer.ReportSource = rpt
Me.CRviewer.RefreshReport()

CRViewer is Crytsal Report Viewer

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.