Extended sample ODA example
To implement an extended custom data source, you perform the following programming and configuration tasks:
*
*
*
An example of an extended ODA data source installs with BIRT Studio. The data source accesses data from an integrated sample database named ClassicModels. To test this custom data source with BIRT Studio, you must first enable the data source, named OdaSampleExt, by setting the data source’s <enabledInEnterpriseMode> attribute in erni_config.xml to true. The erni_config.xml file is stored in the following locations:
In iHub:
<ACTUATE_HOME>\iHub2\servletcontainer\iportal\WEB-INF
In Information Console:
<ACTUATE_HOME>\iPortal\iportal\WEB-INF
Listing 14-5 shows in bold the <enabledInEnterpriseMode> attribute whose value you change from false to true. Look for the ODA data source named OdaSampleExt.
Listing 14-5  
<odaconfig>
  <name>OdaSampleExt</name>
  <displayName>Extended sample ODA data source</displayName>
  <description>An extended sample ODA data source</description>
  <datasourceExtensionId>org.eclipse.birt.report.data.oda.jdbc</datasourceExtensionId>
  <datasetExtensionId>org.eclipse.birt.report.data.oda.jdbc.JdbcSelectDataSet</datasetExtensionId>
  <enabledInWorkgroupMode>true</enabledInWorkgroupMode>
  <enabledInEnterpriseMode>true</enabledInEnterpriseMode>
  <entryPoint>/OdaSample</entryPoint>
</odaconfig>
After you enable the extended sample data source, restart the appropriate Windows service, and open BIRT Studio. When prompted, select one of the standard report templates. The Data Source dialog box, as shown in Figure 14-14, prompts you to select a data source. Select Extended sample ODA data source.
Figure 14-14  
A query builder page, as shown in Figure 14-15, prompts you to select the data to use in the report.
Figure 14-15  
After you select the data and choose OK, the query builder closes, and the data you selected appears under Available Data, as shown in Figure 14-16.
Figure 14-16  

Additional Links:

Copyright Actuate Corporation 2013 BIRT iHub 2