Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » BIRT » Change sql depending on type of the database(what the type of the connected database, (connection profile])
Change sql depending on type of the database [message #1449546] Tue, 21 October 2014 14:06
Alena Bugarová is currently offline Alena BugarováFriend
Messages: 3
Registered: August 2013
Junior Member
I need to change the query text of datasource depending on the type of the connected database, before that the query get executed by the birt runtime.
We have data source on Oracle or Informix database for one report, These databases don't have the same query in some cases.

We use data source from Connection Profile, Birt runtime priew (4.3.)
I tested beforeOpen script of the dataset, but variable con is empty.
I also used this.getDataSource().getExtensionProperty("odaDriverClass"), but this value

showed information from design time and it was not updated in run time.
Can you help me?

beforeOpen script:
var con = reportContext.getAppContext().get("OdaJDBCDriverPassInConnection");
if(con != null) {
var driverclass = con.getMetaData().getURL();
if(driverclass.indexOf("informix") > 0) {
this.queryText = "select Informix..";
else this.queryText = "select Oracle...";

}

Previous Topic:Setting padding for grid
Next Topic:BIRT parameter box question
Goto Forum:
  


Current Time: Thu Apr 25 20:15:39 GMT 2024

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

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

Back to the top