Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » BIRT » Dynamic database adaption(Where to detect externalized database properties)
Dynamic database adaption [message #1696137] Fri, 22 May 2015 09:55
Stefan Seitz is currently offline Stefan SeitzFriend
Messages: 14
Registered: February 2015
Junior Member
Here is what I want to do:
For my application, I have to support three different databases: MS SQL, PostgreSQL and Oracle.
I am using Connection Profiles and externalized properties for my Data Source.

Depending on the database, I have to dynamically adjust the queries.
All this works fine as long, as I use a report parameter to switch between the databases.
What I want to do is, to detect the used database from what is in the connection profile (e.g. by reading "odaConnectionProfile" setting).
I tried reading the property in Data Source -> Before Open Script.
driverClass = String(this.getExtensionProperty("odaDriverClass"));
switch(driverClass){
	case "org.postgresql.Driver":
		myDatasource = "postgresql";
		break;
	case "net.sourceforge.jtds.jdbc.Driver":
		myDatasource  = "ms_sql";
		break;
	case "com.actuate.jdbc.oracle.OracleDriver":
		myDatasource  = "oracle";
		break;
}

Problem is that the result I get here is always the result from what is saved in the Report Design and not what is in the connection profile.

How could I access what is in the connection profile?

Thanks for your help in advance.
Previous Topic:Sum of RowsCount of Two Tables(DataSets)
Next Topic:In BIRT, how to view different master pages with different parameters
Goto Forum:
  


Current Time: Wed Sep 25 23:53:51 GMT 2024

Powered by FUDForum. Page generated in 0.02934 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top