Dynamic Loading of Connection Parameters [message #140153] |
Tue, 07 March 2006 02:12  |
Eclipse User |
|
|
|
Originally posted by: swapnil_sd2001.yahoo.co.in
I read that there is a feature of using the context object in Birt Engine,
but no specific example is given to demonstrate it.
How is it exactly done??
I need this to dynamically load the Connection parameters so that the
parameters if changed at one location would be reflected in all the
reports...
Parameters are:(Database Driver,URL,username,password).
Could you suggest any other method???
|
|
|
|
|
Re: Dynamic Loading of Connection Parameters [message #140205 is a reply to message #140153] |
Tue, 07 March 2006 05:11   |
Eclipse User |
|
|
|
You could do this using a parameter passed into the report. We do this to
switch between live and test databases. just create report parameters such
as dbUrl, or environment, then in your data source "property bindings", use
someting like:
if (params["environment"]=="test") {"jdbc:oracle:thin:@test:1521:yourdb"; }
else {"jdbc:oracle:thin:@live:1521:yourdb"; }
I havent found a way of basing this on an environment variable of the
operating system, the documentation says you should be able to use:
config["XXX"]
where XXX is set in the OS, but this just doesnt work (on XP at least),
unfortunately, and noone seems to care.
Birt.
"Swapnil" <swapnil_sd2001@yahoo.co.in> wrote in message
news:74d7e6adab66600f8a2848f6b1ccc40b$1@www.eclipse.org...
>I read that there is a feature of using the context object in Birt Engine,
>but no specific example is given to demonstrate it.
>
> How is it exactly done??
>
> I need this to dynamically load the Connection parameters so that the
> parameters if changed at one location would be reflected in all the
> reports...
>
> Parameters are:(Database Driver,URL,username,password).
>
> Could you suggest any other method???
>
|
|
|
Re: Can't anybody answer this??? [message #140207 is a reply to message #140201] |
Tue, 07 March 2006 05:33   |
Eclipse User |
|
|
|
Originally posted by: srajkavithaa.yahoo.com
Hi,
i am new to this group, and i dont know how to post a message
and i am also having a question reg this only, pls help me.
I linked 2 reports using the Navigation URL - Drill thru option.
while linking i pass some values from main report to the child report's
parameter. while navigating at the first time, the parameter binds with
the correct value and the child report shows the correct data. but after
that, the parameter is not refreshed with the correct data which is
correctly added in the URL and shows the old answer only.
i think the parameter is not refreshed if it has a value, why i am saying
like this is, if there is any default value asssigned for that child
report parameter then at that time also the child is showing the correct
data, it shows result based on the default value only.
so how can i get the correct child report from every link in the main
report,
pls help me out of this.
Thanks,
-kavi
|
|
|
|
|
|
Re: Dynamic Loading of Connection Parameters [message #735684 is a reply to message #735499] |
Wed, 12 October 2011 10:22  |
Eclipse User |
|
|
|
This looks like a property binding expression on the data source.
Property Binding is available in the dataset/datasource editor as one of
the tabs. You can put an expression in for the dburl, user, pwd, etc.
You can also change these properties in the beforeOpen script of the
datasource like:
this.setExtensionProperty("odaURL","jdbc:mysql://localhost/mysql");
the property for user is odaUser and the property for password in
odaPassword.
And yes this should change these values at runtime.
Jason
On 10/11/2011 11:18 PM, karvesh wrote:
> Simon,
>
> Dear all,
> i am having an issue when it comes to deploy the reports from
> development environment to production one. The two environments have
> different database names and passwords.
>
> You mentioned something like
>
> if (params["environment"]=="test")
> {"jdbc:oracle:thin:@test:1521:yourdb"; } else
> {"jdbc:oracle:thin:@live:1521:yourdb"; }
>
> Is it a way to set the connection parameters at runtime? And where is
> the password in the parameter?
>
> karvesh
|
|
|
Re: Dynamic Loading of Connection Parameters [message #735713 is a reply to message #735499] |
Wed, 12 October 2011 10:22  |
Eclipse User |
|
|
|
This looks like a property binding expression on the data source.
Property Binding is available in the dataset/datasource editor as one of
the tabs. You can put an expression in for the dburl, user, pwd, etc.
You can also change these properties in the beforeOpen script of the
datasource like:
this.setExtensionProperty("odaURL","jdbc:mysql://localhost/mysql");
the property for user is odaUser and the property for password in
odaPassword.
And yes this should change these values at runtime.
Jason
On 10/11/2011 11:18 PM, karvesh wrote:
> Simon,
>
> Dear all,
> i am having an issue when it comes to deploy the reports from
> development environment to production one. The two environments have
> different database names and passwords.
>
> You mentioned something like
>
> if (params["environment"]=="test")
> {"jdbc:oracle:thin:@test:1521:yourdb"; } else
> {"jdbc:oracle:thin:@live:1521:yourdb"; }
>
> Is it a way to set the connection parameters at runtime? And where is
> the password in the parameter?
>
> karvesh
|
|
|
Powered by
FUDForum. Page generated in 0.06704 seconds