#### How to specify the connection information for a database or other JDBC data source

1. Create a data source.
2. Specify the type and name of the data source:

1. In the list of data source types, select JDBC Data Source.
2. In Data Source Name, type a name for the BIRT Report Designer data source. The name must be unique in the current report design. Figure 2-8 shows a default data source name.

Figure 2-8 Creating a JDBC data source
3. Choose Next.
New JDBC Data Source Profile shows connection information options, as shown in Figure 2-9.

Figure 2-9 Defining JDBC connection information

3. Specify the connection information for the JDBC data source:

1. In Driver Class, choose a driver class from the drop-down list. If you do not see the driver class that you want to use, add a driver as described later in this chapter.
2. In Database URL, type the database URL, using the syntax that the driver requires. Typically, BIRT Report Designer displays the necessary syntax in Database URL. For a Sun JDBC/ODBC bridge, the syntax is:

    jdbc:odbc:<data source name>

where <data source name> is the name of your data source. For example, the following URL identifies the sales database:

    jdbc:odbc:sales

3. In User Name, type the user name to use when connecting to the JDBC data source. This field can be left blank if your data source does not require a user name.
4. In Password, type the password to use when connecting to the JDBC data source. This field can be left blank if your data source does not require a password.
5. In JNDI URL, type a JNDI URL. This field can be left blank if your data source does not require a JNDI URL.

4. To ensure that the connection information is correct, choose Test Connection.
If Test Connection returns an error, repeat the preceding steps to correct the error. Then, test the connection again.
5. Choose Finish.
The new BIRT data source appears under Data Sources in the data.