- Home
- DevShare
- Forums
- Wiki
- Products & Services
- Downloads
- Documentation
- Webinars
- Store
- Blog
Database configuration files in e.Spreadsheet
e.Spreadsheet and BIRT reports has the ability to change the data source connection information at runtime using configuration files.
In e.Spreadsheet Designer, you can create a data source to provide the connection information for a database or other data source. When you run a report using Actuate iServer system, you can use a different data source connection than the connection that you provided int her eport. You can change the connection information for one report or update the connection information for every report that you run on an iServer machine. To set run-time connection information, you usea connection configuration file.
Using a connection configuration file
A connection configuration file is an XML file that you can use to set data source connection settings to use when Actuate iServer system runs a report. The settings that you include in a connection configurtaiton fiel can overrride the settings in a report. For example, you can develope a report using one data source, such as a test database. Then, you can create a connnection configuration file to run the report with a differnt data source, such as the production equivalant production database.
You can use the same connection configuration file for every spreadsheet report that you run on Actuate iServer. e.Spreadsheet Designer and BIRT use the same connecton configuration file. Each entry in the file is specifically for a particular product.
Actuate iServer expects the file to be in UTF-8 encoding, which allows a variety of special characters. You can also a file with only ASCII characters.
There is no default location for the connection configuration file. To use a connection configuration file, you create the file and then specify its name and location using the ConnConfigFile parameter in Actuate Management Console. Set the ConnConfigFile parameter to the absolute path and name of your connection configuration file. If you have a cluster of iServers, each iServer in the cluster must have access to the file. The path can be local absolute path and name of your connection configuration file must be specified for each iServer in the server configuration. If you use a single copy of the file for a cluster, put the file in a shared location and then specify the path to that shared location for all iServers in the cluster.
When you run a report, Actuate iServer uses the connConfigFile parameter to identitfy where to find a configuration file. Actuate iServer uses the connection information in the file to connect to a datasource. If no configuration file exists, or if the file does not correctly specify a data source, then Actuate iServer uses the connection information from the datasource definition in the spreadsheet report.
Creating a connection configuration file:
To create a connection configuration file, create an XML file and provide connnection values for one more data sources. Each entry in a connection configuration file must include the name of the data source and one or more of the available properties for a connection to that data source.
To override teh connection information in an e.Spreadsheet Designer data source, create a ConnectOptions element with one or more property sub-elements, using the following syntax.
* connection_name is an identifier used to identify a set of connection properties for a data source. The connection name must be unique within the set of connection name identifiers for a particular product. For example you can use Production_db as a connection name for an e.Spreadsheet Designer connection and for a BIRT connection. The connection name does not need to match the name of the data source in the report.
* Data_source_name is the name of the data source that the report uses. The data source name must match the name of the data source in the report.
* Property_name is the case-insentive name of the property toset
* Prop_value is the property's value.
Connection Configuration file properties:
Actuate Data Integration Service Connection
Property Name: Datasource
The name of the e.Spreadsheet Designer Actuate Data Integration Service Connection data source
Property Name: Serveruri
URI of Actutae iServer for the information object
Property Name: Volume
Name of the Encylopedia volumen in which the information object appears
Property Name: Username
Username for Actuate iServer
Property Name: Password
Password for Actuate iServer
Flat File Source
Property Name: Datasource
The name of the e.Spreadsheet Designer Flat File data source
Property Name: File
Full path or URL to the file
Property Name: Filetype
File type. Must be XML or TEXT. Required
Property Name: Columnpositions
Comma-seperated list of column positions in ascending order. If this property is set, and the filetype=TEXT, e.Spreadsheet Enginer or Desinger assumes tha the field's data is fixed-width text.
Property Name: Characterdelimiter
Delimiter. The characters that are used to delimit the file can be a single character or a string of chracters and can contain special chracters suchs as (\).
Property Name: Textqualifier
The character that is used to qualify text when processing delimited text. Must be a single character. This property is ignored if the data source is a delimited text file. The default value is noting.
Property Name: TreatConsecutivedelimiterssone
Must be true or false. This property is ignored if this data source is not a delimited text file. The default value is false.
Property Name: Codepage
Any one of the following text encodings:
ANSI UTF8 UTF16BE UTF16LE
Property Name: Columnnames.delimiters
Chracter or list of characters to be recognize as the delimiters of the columnnames property. If this property is
not set, it uses its default value, ",;:".
Property Name: Columnnames
Delimited list of names to assign to columns. This property is ignores unless this data source is a fixed-width or delimited
text file.
Property Name: ColumnTypes
Comma-delimited list of number formatting to assing to columns. For example , G,G,N,S,T is a list of number formats for five columns. This property is ignores unless this data source is fixed-width or delimited text file. Valid characters include:
G is the general format
S skips the column entirely, including data
T is the text format
N is the number format
Property Name: Startrow
0-based row number from which to start processing. Only valif if filetype=TEXT. If this property is not set, it uses the default value 0.
Property Name: RefreshIndex
This data source's index number in the refresh order. Any number from 0 to 128, or -1 to set no specific refresh index. The default value is -1. Lower number values indicate higher placement in the refresh order.
JDBC Source
Property Name: Datasource
The name of the e.Spreadsheet Designer JDBC Source data source.
Property Name: Driver
Fully qualified JDBC driver class's name. Required unless the jndi.name property is set
Property Name: Database
Database URL. Required unless the jndi.name property is et
Property Name: User
Database user name to use when establishing a connection. The default value is an empty string
Property Name: Password
Database password to use when establishing a connection. The default value is an empty string
Property Name: Jndi.name
Fully qualified JNDI name of valid javax.sql.DataSource object in the JNDI tree. Required unless both driver and database are set. This property takes precedence over the .driver and .database properties when all three are set
Property Name: RefreshIndex
This data source's index number in refresh order. Any number form 0 to 128, or -1 to set no specific refresh index. The default value is -1. Lower number indicate higher placement in the refresh order.
Property Name: Intrxmlopt.*
An intermediate XML schema option. Replace the asterisk with a valid intermeidate XML schema option's name. The value of the property must be a valid value for the given option. For more information, including valid options and values, see the setIntermediateXMLOption method in the API
Property Name: Connectionproperty.*
Prefix for properties that are extracted, put into a new java.util.Properties object, and passed to the setAdvancedCoonnectionProperties method.
Example:
In this case, the property name that is extracted to the new java.util.Properties object is username, and the value of the property , jim, is set as the value of the new username property in the new Properties object.
These properties are ignored if the jndi.name property is set. If any of these properties are set, the username and password properties are ignored.
SAP Connection
Property Name: Datasoruce
The name of the e.Spreadsheet Desinger SAP Connection data source.
Property Name: Client
Client-system identifier
Property Name: Groupname
Group name for the SAP group server in a load-balanced environment
Property Name: Messageserver
Message-server identifier
Property Name: Systemid
Numeric identifer of the SAP system
Property Name: Language
Default language setting for the connection, such as EN for English
Property Name: System
Application server such as 12.34.56.78
Property Name: Router
SAP router string, such as
/H/23.34.55.98/H/73.62.17.91/H/
Property Name: Systemnumber
SAP system number, such as 03.
Property Name: Username
User name for the sAP account
Property Name: Password
Password for the SAP account
Property Name: Rollbackonclose
Indicator whether to roll back transactions when the server fails. Set to TRUE or FALSE. As e.Spreasheet Designer only issues queries to the SAP system, there are no changes that would be rolled back and both TRUE and FALSE have the same effect. However, the SAP requires this value to be set
Example of a sample configuration file:
The following example shows how the settings in a connection configurationf iel can direct Actuate iServer to use production server when it runs a report. Both the development database and the production database use the Oracle thin drive. The connection configuration file change the SalesConnection data source from the develoment database, devserver, to the production database, prodserver:
jdbc:oracle:thin:@prodserver:1521:salesdb
Site Map | Terms & Conditions | Privacy Statement | Contact Us
BIRT Exchange is a community site for Eclipse BIRT and Actuate BIRT developers who are adding reporting, analytics and business intelligence capabilities to Java applications. BIRT Exchange allows developers to share code samples and report designs, tutorials, technical articles, as well as tips and tricks. BIRT Exchange also offers forums, downloads, online documentation, and information on BIRT technical support.

(0 reviews, 9262 views)