Consultor Eletrônico



Kbase P106992: Error "Insufficient information to connect to the data source" when attempting to view a Crystal rep
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   5/9/2006
Status: Unverified

FACT(s) (Environment):

Progress 9.1D
Progress 9.1E
OpenEdge 10.0x
Crystal Reports 9
Crystal Reports 10
Crystal Reports 11 (XI)
Windows

SYMPTOM(s):

Attempting to display a Crystal report via 4GL

Crystal Report Viewer error occurs when loading the report

Logon failed.
Details: HY000:[DataDirect][ODBC PROGRESS driver]Insufficient information to connect to the data source

Test Connect via the ODBC DSN is successful

Name of ODBC DSN has been changed/New ODBC DSN is being used

New name for ODBC DSN has been used in the LogOnServer method

Crystal report was created against an ODBC DSN with a different name

CAUSE:

This appears to be a bug in the LogOnServer method of the Crystal RDC. According to the Crystal Technical Reference Guide, "For parameters pServerName, pDatabaseName, and pUserId, pass an empty string ("") to preserve the existing setting or pass a non-empty string (for example, "Server A") to override a value that is already set in the report." Therefore changing the ServerName parameter of the LogOnServer method should be sufficient to override the DSN ConnectionProperty (contains the name of the ODBC DSN against which the report was created) stored in the report. This is not the case however and the error occurs.

FIX:

Option #1
Override the DSN ConnectionProperty, as detailed in solution P47202.

Option #2
Reset the ConnectionProperties of the report at runtime, instead of using the LogOnServer method.
Use of the ConnectionProperties collection is detailed in solution P55350, and sample code is provided in Option #1.