Crystal Reports Online Training

Learn Online, Anytime, Anywhere

Step-by-step online tutorials.

10.07 ODBC Connections

ODBC Connections

To connect using ODBC, you need the name of an existing ODBC DSN. When you installed Crystal Reports, it automatically created the ODBC DSN called “Xtreme Sample Database 11”. To connect to it, on the Data tab of the Database Expert open the ODBC (RDO) folder. This immediately opens the ODBC dialog box shown in Figure 10-4.



Figure 10-4. Selecting the ODBC connection.

There are three options on the ODBC dialog box, of which you will probably just use one. The first option lists the names of the available data sources stored on your computer. As you can see in the above figure, the Xtreme Sample Database 11 connection is listed there. Click on it to select it and then click the Next button.

The other two options are File DSNs and connection strings. As mentioned earlier, they aren’t used much anymore and I’m not going to discuss them.

Clicking the Next button changes the dialog box so that you are prompted for your connection information. You need to enter the User ID and Password for accessing the database. If your Windows login also serves as the login to SQL Server, then you don’t have to enter anything for the User ID and Password. The fact that you are logged into the computer is sufficient.

After entering the User ID and Password and clicking the Finish button, you are returned to the Data tab. It now displays your data source and the tables associated with it. At this point you can select the tables you want on your report and proceed to the Links tab (which is discussed later in the chapter).