Previous TopicNext Topic


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 Data sources, 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.
    3. Figure 2-8 shows a default data source name.

      Figure 2-8 Naming a data source
    4. Choose Next.
    5. 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, set up the driver as described in "How to add a JDBC driver," 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:
    3. 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 
      
    4. In User Name, type the user name to use when connecting to the JDBC data source.
    5. If the JDBC data source does not require a user name, leave this field blank.
    6. In Password, type the password to use when connecting to the JDBC data source.
    7. If the JDBC data source does not require a password for this user name, leave this field blank.
    8. In JNDI URL, type a JNDI URL if your data source requires one.
  4. To ensure that the connection information is correct, choose Test Connection.
  5. If Test Connection returns an error, repeat steps 3 and 4 to correct the error, then test the connection again. Use Test Connection if you have not used the driver before.
  6. Choose Finish.
  7. The new BIRT data source appears under Data Sources in the data explorer, as shown in Figure 2-10.

    Figure 2-10 A data source in the data explorer

(c) Copyright Actuate Corporation 2006

Previous TopicNext Topic