Skip to main content



      Home
Home » Archived » BIRT » URL of datasource as parameters?
URL of datasource as parameters? [message #101600] Thu, 22 December 2005 05:49 Go to next message
Eclipse UserFriend
Originally posted by: XnoXspamXyeecn.pd.jaring.my

Hi,

Is it possible to parameterize the datasource of a report? My particular use
case is that my application is serving different customers, and it is
switching database connections behind the secne depends on the user's login.
I like to have my reports able to switch database as well. Is this possible
with BIRT?

Thanks my advance.

Yee
Re: URL of datasource as parameters? [message #102610 is a reply to message #101600] Tue, 27 December 2005 15:37 Go to previous messageGo to next message
Eclipse UserFriend
Yes it's possible. With BIRT 2.0 there are two ways to do this:
(1) Use Data Source Property Binding. This is a new feature added to 2.0 and
you will need the latest nightly build (post-M3) to see this work. A
description of this feature is here:
http://www.eclipse.org/birt/wiki/index.php?n=BPS.BPS40. You can, for
example, bind a JDBC data source's URL property to a Javascript expression
that returns a url constructed based on the user login (the user login in
turn can be passed in as a report parameter).

(2) Use BIRT Scripting. In the Data Source's beforeOpen script (or its
script event handler's
org.eclipse.birt.report.engine.api.script.eventHandler.befor eOpen method, if
you are using the new Java scripting feature), you can set the data source's
URL connection property to a value based on runtime settings. For more
information and code example, search this newsgroup - there had been some
previous posts on this topic.

regards,
Gary Xue
Actuate Corporation - Product Development
BIRT Committer

"YeeCN" <XnoXspamXyeecn@pd.jaring.my> wrote in message
news:doe0cv$ram$1@utils.eclipse.org...
> Hi,
>
> Is it possible to parameterize the datasource of a report? My particular
use
> case is that my application is serving different customers, and it is
> switching database connections behind the secne depends on the user's
login.
> I like to have my reports able to switch database as well. Is this
possible
> with BIRT?
>
> Thanks my advance.
>
> Yee
>
>
Re: URL of datasource as parameters? [message #102715 is a reply to message #102610] Wed, 28 December 2005 04:08 Go to previous message
Eclipse UserFriend
Originally posted by: zhangliang.vip.gmail.com

it's ok,can use the params to change the datasource.
Previous Topic:can use the url in the chart ?
Next Topic:How to add a vertical column?
Goto Forum:
  


Current Time: Thu May 08 08:14:39 EDT 2025

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

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

Back to the top