Skip to main content



      Home
Home » Archived » BIRT » How to switch DBs based on an ENV VAR (not a parameter)
How to switch DBs based on an ENV VAR (not a parameter) [message #131892] Thu, 16 February 2006 18:46
Eclipse UserFriend
We want to develop reports against a test database, but deploy them to a
live envirotment which has a live database. This seems to be very
difficult - we have invested many man days ( and a lot of money) in trying
to find a way of doing this. The nearest we have come across is using the
data source property bindings option in birt 2, as defined in:

http://birtworld.blogspot.com/2006/01/eclipse-birt-20-releas e-candidate-is.html

For example:

if (params["DEPLOYMENT"]=="test") {"jdbc:oracle:thin:@test:1521:db"; }
else {"jdbc:oracle:thin:@live:1521:db"; }

However, this only works with report parameters, not environment variables.

We tried using:

if (config["DEPLOYMENT"]=="test") {"jdbc:oracle:thin:@test:1521:db"; }
else {"jdbc:oracle:thin:@live:1521:db"; }

as according to the birt documentation, config contains environment
variables, but it doesnt work here.

The error that both these examples give is:

Error evaluating Javascript expression. Script engine error: DEPLOYMENT
not found

DEPLOYMENT is defined as a system wide environment unders windows XP.

Does anyone know of a way to deploy reports such that they point to the
right db depending on which server they are deployed to, without haveing
to edit and recomopile the reports for each environment? If so can you
give a detailed example of how its done? We are deploying the reports to
a web based reporting server running under resin. Also we dont really
want to have to hack it by writing programs to edit the birt underlying
reporting files each time we deploy between development/test and live,
even if that is possible.

Thanks for any help.
Previous Topic:Using an Oracle Stored Procedure as Data Set Type
Next Topic:birt2 viewer observations ?? design / runtime issues with IE & FF
Goto Forum:
  


Current Time: Mon Jul 14 08:19:10 EDT 2025

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

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

Back to the top