Connecting to data sources : About data source connection properties : Using a connection configuration file
 
Using a connection configuration file
A connection configuration file is an XML file, such as the one shown in Listing 3‑1, in UTF-8 or ASCII encoding. The file specifies the data source connection properties to use when iHub runs a report. Having the data source connection information for a report in an external file makes it convenient to modify. You change the connection information without altering the report design. You specify the location of the file using Configuration Console.
You can use an external connection configuration file to define a data source for the Actuate Caching service and for a data connection definition (.dcd) file, which contains information object connection properties for a data source. You can also use an external connection configuration file for connecting data sources to reports.
You can create an external connection profile to a data source used by a report. Changes to the profile are automatically picked up by the report. The settings in a connection configuration file override any connection configuration properties in the connection profile. The sample connection configuration file in Listing 3‑1 externalizes the file path to the connection profile, C:\Mypath.
Listing 3‑1 BIRT connection configuration file example
<oda-data-source extensionID="org.eclipse.birt.report.data.oda.jdbc" name="JDBC Data Source - SQL Server" id="783">
<property name="odaDriverClass">com.actuate.jdbc.sqlserver. SQLServerDriver
</property>
<property name="odaURL">jdbc:actuate:sqlserver://DBSRV1-W2K
</property>
</oda-data-source>
<ConnectOptions Type=".eclipse.birt.report.data.oda.jdbc_ JDBC Data Source - SQL Server ">
<Property PropName="OdaConnProfileStorePath">C:\Mypath
</Property>
</ConnectOptions>
In a BIRT report, the configuration key used to specify a data source is the unique ID of the ODA data source extension and data source name defined in the BIRT report design or library. You must concatenate the string as follows:
extensionID + “_” + data source name
For example, the key is org.eclipse.birt.report.data.oda.jdbc_SQL Server.