Skip to main content



      Home
Home » Archived » BIRT » Specify JDBC Connection URL at RunTime (or at least deployment time)?
Specify JDBC Connection URL at RunTime (or at least deployment time)? [message #94960] Mon, 28 November 2005 18:11 Go to next message
Eclipse UserFriend
Originally posted by: pcasey.earthlink.net

I design my BIRT reports against a test database with a JDBC connection
UID, PASSWORD, etc that point to, and authenticate against, a test system. I
want to deploy these reports to a prodution environment where they'll point
to a production instance with an entirely different connection URL.

I can't seem to figure out though how to specify the JDBC connection URL
property in my production system. The Driver's there in
/plugins/...jdbc_1.0.1 and properly configured. My reports all try to
connect using the credentials I used at design time though :(. How do I go
about telling a report to look for its data from a source *different* from
that which it was designed against?

--- Pat
Re: Specify JDBC Connection URL at RunTime (or at least deployment time)? [message #94973 is a reply to message #94960] Mon, 28 November 2005 20:53 Go to previous message
Eclipse UserFriend
In BIRT 1.x and 2.0 the best way to do this is to use Scripting. The
following info was posted earlier in this newsgroup and is repeated here:

------
The best way to achieve this is to edit the beforeOpen script of the data
source object to set the runtime information of the data source. To do this,
right click on your JDBC data source and select "Edit Code". In the method
dropdown list, select "beforeOpen". In the code editor, write a script like
this:

extensionProperties.odaUser = "sesame";
extensionProperties.odaPassword = "open";
extensionProperties.odaURL = "jdbc:my_data_source:....";
extensionProperties.odaDriverClass = "com.mycompany.jdbc.Driver";

Refer to the BIRT ROM scripting spec for more information about scripting in
general. The names of the properties that you can set (odaUser, odaPassword,
etc.) are defined by the ODA extension. The BIRT-shipped ODA-JDBC driver
extension recognizes the above 4 properties.
-------

We are looking to further improve the usability in this area beyond the 2.0
release. If you are interested please review this project proposal and post
your feedback at the Wiki page
http://www.eclipse.org/birt/wiki/index.php?n=BPS.BPS40

regards,
Gary Xue
BIRT Committer - Data Engine Project


"Patrick Casey" <pcasey@earthlink.net> wrote in message
news:dmg2qc$h24$1@news.eclipse.org...
>
> I design my BIRT reports against a test database with a JDBC connection
> UID, PASSWORD, etc that point to, and authenticate against, a test system.
I
> want to deploy these reports to a prodution environment where they'll
point
> to a production instance with an entirely different connection URL.
>
> I can't seem to figure out though how to specify the JDBC connection URL
> property in my production system. The Driver's there in
> /plugins/...jdbc_1.0.1 and properly configured. My reports all try to
> connect using the credentials I used at design time though :(. How do I go
> about telling a report to look for its data from a source *different* from
> that which it was designed against?
>
> --- Pat
>
>
Previous Topic:drill-through problem
Next Topic:bug with dataset column alias
Goto Forum:
  


Current Time: Tue May 06 19:29:34 EDT 2025

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

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

Back to the top