Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » BIRT » Dynamic Loading of Connection Parameters
Dynamic Loading of Connection Parameters [message #140153] Tue, 07 March 2006 02:12 Go to next message
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???
Can't anybody answer this??? [message #140201 is a reply to message #140153] Tue, 07 March 2006 03:56 Go to previous messageGo to next message
Eclipse User
Originally posted by: swapnil_sd2001.yahoo.co.in

please answer this it's very urgent and very important........
Re: Can't anybody answer this??? [message #140202 is a reply to message #140201] Tue, 07 March 2006 04:23 Go to previous messageGo to next message
Eclipse User
Originally posted by: swapnil_sd2001.yahoo.co.in

I wanted to know if reports can access the connection parameters from an
external data source and the changes made in the xml can be reflected in
the connection parameters on the data source element of the report.


Is this a solution if yes how does it exactly work as i am not able to get
the desired o/p.

please respond as quickly as possible.......

It's very urgent!!!!!
Re: Dynamic Loading of Connection Parameters [message #140205 is a reply to message #140153] Tue, 07 March 2006 05:11 Go to previous messageGo to next message
Simon Hobbs is currently offline Simon Hobbs
Messages: 40
Registered: July 2009
Member
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 Go to previous messageGo to next message
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: Can't anybody answer this??? [message #140575 is a reply to message #140202] Tue, 07 March 2006 07:27 Go to previous messageGo to next message
Eclipse User
Originally posted by: jan.tanis.coas.com

Datasource param binding is possible at runtime.

Swapnil wrote:
> I wanted to know if reports can access the connection parameters from an
> external data source and the changes made in the xml can be reflected
> in the connection parameters on the data source element of the report.
>
>
> Is this a solution if yes how does it exactly work as i am not able to
> get the desired o/p.

While editing a datasource you see property binding. Should guide itself;)

>
> please respond as quickly as possible.......
>
> It's very urgent!!!!!
>

Good luck, Jan.
Re: Dynamic Loading of Connection Parameters [message #141727 is a reply to message #140205] Wed, 08 March 2006 11:28 Go to previous messageGo to next message
Eclipse User
Originally posted by: swapnil_sd2001.yahoo.co.in

Thanks for finding time for answering this,

but what i need to know is that this condition has to be applied to about
50 reports so i need to keep this dynamic and not just switching in two
places as the url.....

I don't just want the url changing, I want all the possible combinations
changing.......

Also I read about an external object being passed to the birt engine....

Could anybody give me a possible answer in form of a code......


The assigning of the Map; the structure of the Map and the way in which it
is read in the BIRT Engine.......


Please answer as quickly as possible.........


SWAPNIL
Re: Dynamic Loading of Connection Parameters [message #735499 is a reply to message #140205] Tue, 11 October 2011 23:18 Go to previous messageGo to next message
karvesh ghunsam is currently offline karvesh ghunsam
Messages: 95
Registered: July 2011
Member
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 #735684 is a reply to message #735499] Wed, 12 October 2011 10:22 Go to previous message
Jason Weathersby is currently offline Jason Weathersby
Messages: 9167
Registered: July 2009
Senior Member

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 Go to previous message
Jason Weathersby is currently offline Jason Weathersby
Messages: 9167
Registered: July 2009
Senior Member

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
Previous Topic:Including parameter entry UI in a BIRT report
Next Topic:Tree of cascaded parameters
Goto Forum:
  


Current Time: Sun Aug 31 06:30:35 EDT 2014

Powered by FUDForum. Page generated in 0.02239 seconds