Skip to content

Troubleshooting data-source login failures

When a report logs in fine on another machine but fails in ViewerFX for Crystal Reports with a login error — even though the credentials are correct — the cause is often that its ODBC data source (DSN) is registered only for 32-bit programs. ViewerFX is a 64-bit application, and a 32-bit ODBC driver cannot load in a 64-bit process.

Crystal Reports reports several unrelated problems — a missing database driver, a wrong password, an unreachable server, a rejected secure connection — with the same “Invalid Login Credentials” message. A data source that works in a 32-bit application can therefore fail here with what looks like a credentials error even when the user name and password are correct.

Reading ViewerFX’s login-failure message

Section titled “Reading ViewerFX’s login-failure message”

Because that one message covers several causes, ViewerFX does not assert a single reason. When a login fails, it shows a numbered list of possible causes. The first item is always the login error itself; each further item is added only when ViewerFX has positively confirmed that dependency is missing or unusable — so a cause appears only when it genuinely applies, and nothing is guessed.

When the report uses an ODBC data source, one of the numbered items reports the state of that DSN — whether it is missing, present but 32-bit (which this 64-bit application cannot use), or present but a possible driver or bitness mismatch. That item is what separates a bitness problem from an ordinary wrong-password problem.

To bring the diagnostic up on a report that is failing, turn on Enable Datasource Modifications in Settings › Customize, open the report, and complete the connection so the login runs; the numbered causes appear when it fails. (The message appears on any login failure — enabling the option simply lets you drive the connection deliberately.)

  • Install the 64-bit version of the ODBC driver the report needs.
  • Create the DSN in the 64-bit ODBC Data Source Administrator, which opens from C:\Windows\System32\odbcad32.exe.
  • Use the same DSN name the report expects, and confirm the driver, server, and database.

Note: The naming is counterintuitive. On 64-bit Windows, System32\odbcad32.exe is the 64-bit administrator, while the 32-bit one lives under SysWOW64. A DSN created in the 32-bit administrator is invisible to ViewerFX, so a DSN that “already exists” may still need to be recreated on the 64-bit side.

When the diagnostic can’t identify the cause

Section titled “When the diagnostic can’t identify the cause”

The diagnostic recognizes ODBC DSNs and OLE DB providers. Some connections do not go through either — native Oracle connectivity, for example — so ViewerFX cannot classify them and adds no cause for them rather than guessing. If a report connects through a native Oracle client and fails to log in on 64-bit ViewerFX, install the 64-bit Oracle client, for the same reason a 64-bit ODBC driver is required: a 32-bit client cannot load in the 64-bit application.