Symptom
- Can we use a connection string to connect to a database?
- How do you connect to a data source using a connection string without an ODBC DSN, in Crystal Reports?
Environment
-
SAP Crystal Reports 2013
-
SAP Crystal Reports 2016
-
SAP Crystal Reports 2020
Resolution
- To connect to a database via an ODBC connection, using a connection string in Crystal Reports:
-
In Crystal Reports, under the menu "File", select "New - Blank Report..."
-
In the "Database Expert", under "Create new connection", expand: "ODBC (RDO)"
-
In "ODBC (RDO)", select the option "Enter Connection String"
-
In "Connection String", enter the database connection string.
For information on the syntax, refer to your database ODBC driver documentation.
For example, the connection string for MS SQL Server will be like:Driver=SQL Server; Server=My SQL Server Server; Database=MyDatabase; UID=DatabaseUser
Explanation:
- Driver : The name of the ODBC driver required.
- Server : Database Host Server name.
- Database : Database Name.
- UID : Database User Name required for the database logon. - Note: The ODBC driver used for the connection string, needs to be installed on the computer where Crystal Reports is installed.
Keywords
CR, ODBC , KBA , BI-RA-CR , Crystal Reports designer or Business View Manager , How To