Home
Analytics
Ccnnection parameters from an external property file
PRAMODML
I have BIRT reports that obtains the data from the different jdbc data source(like PROD,QUALITY,DEV). Is it possible to obtain the connection parameters (Driver URL, User Name, and Password) from an external property file or similar. Very much URGENT please
Find more posts tagged with
Comments
kclark
I don't understand the question, are you meaning to prompt the user for the login information when the report is run then pass this along in a script to retrieve that data?
PRAMODML
No,
I have Database information like URL,USERNAME,PASSWORD, in properties file I want to use this information(file) for creating the Datasource in BIRT is it possible ? and I can create an customized template for Datasource.
kclark
Thanks for the clarification! I think the best way to be able to do this is first set the resource file in the reports top-level properties. After that you should be able to use the property key value to bind it to the data source. After you've set the resource file you can right click your data source > edit > property bindings and then you can connect everything with the expression builder.<br />
<br />
You might need to use some code similar to this<br />
<br />
<pre class='_prettyXprint _lang-auto _linenums:0'>
reportContext.getMessage("propertyKey", reportContext.getLocale());
</pre>
PRAMODML
Hi clark,
I have this requirement following requirement,
? Creating a template that can dynamically get the database connection in datasource level.
? This template will contain only a datasource.
? The Datasource must have a way to provide a dynamic database connection.
? This template doesn?t have dataset defined.
? The Dataset should be empty.
? The property file should be defined in the system environment level.
how to achieve this in BIRT.. please it very much urgent, It would be greatful to u if you can help me on this.
Would be eagerly waiting for u r help in achieving the tak
PRAMODML
continued.....
Objective:
? To be able to use the report template in different environment and reference a database connection defined in the system level.
kclark
paramodml,<br />
Take a look at <a class='bbc_url' href='
http://www.birt-exchange.org/org/devshare/designing-birt-reports/251-dynamic-location-for-birt-connection-profile-store/'>this
devshare</a> and see if this helps you any.
PRAMODML
Hi Clarke,
Thanks for the reply.
Instead of <property name="OdaConnProfileStorePath">C:\work\databases\switch_conn_profile</property>
is it possible locate/provide the System properties or the Dynamic Value,Instead of Hard coded value