Sample ODA data source
Creating a custom user interface to connect to a BIRT JDBC data source does not require additional coding. You must configure the data source and data set and describe the data set columns in the erni_config.xml file, as shown in Listing 14-3.
Listing 14-3  
  <displayName>Sample ODA data source</displayName>
  <description>A sample ODA data source</description>
  <!--     <odaPassword>      </odaPassword>     -->
<!-- Data Type can be DECIMAL(3)/INTEGER(4)/FLOAT(6)
  <!--     <queryText>      </queryText>     -->    
To test the sample ODA data source with BIRT Studio, you must first enable the data source, named OdaSample, by setting the data source’s <enabledInEnterpriseMode> attribute in erni_config.xml to true. The erni_config.xml file is stored in the following location:
<context root>\WEB-INF
Typically, in standard installations the <context root> is as follows:
In iHub:
In Information Console:
After you enable the sample data source, restart the appropriate Windows service for iHub or Information Console, and open BIRT Studio. When prompted, select one of the standard report templates. The Data Source dialog box, as shown in Figure 14-12, prompts you to select a data source. Select Sample ODA data source.
Figure 14-12  
Based on the XML definition in erni_config.xml, the product displays a sample ODA editor with a table, containing the configured database columns, as shown in Figure 14-13.
Figure 14-13  
The check boxes appearing next to the column names allow the user to select the data for the report. The editor gives the user ability to create a parameter for filtering the data in the last column.
Table 14-1 lists all the configuration attributes and their descriptions.
Configuring the ODA data source requires knowledge about your JDBC data source and data set. If you do not know this information, you can obtain the database connection properties from your database administrator. It is a good practice to create first a sample report in BIRT Designer Professional and validate the connection and the database query. You use the XML source of the created report to identify the correct values for the sample ODA configuration. Look for the attribute values in the <data-sources> and <data-sets> tags at the beginning of the report XML.
Listing 14-4 shows portions of the report XML that contain the configuration attributes and their values.
Listing 14-4  
  <oda-data-source extensionID="" name="Data Source" id="7">
  <property name="odaDriverClass"></property>
  <property name="odaURL">jdbc:classicmodels:sampledb</property>
  <property name="odaUser">ClassicModels</property>
<oda-data-set extensionID=
  "  JdbcSelectDataSet" name="Data Set" id="8">
  <xml-property name="queryText"><![CDATA[select *
  from CLASSICMODELS.PAYMENTS]]></xml-property>

Additional Links:

© Copyright OpenText Corp. All rights reserved. Privacy Policy | Cookie Policy

BIRT iHub 2