Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » BIRT » [HELP] Two data sources.(How to select data sources.)
icon3.gif  [HELP] Two data sources. [message #891673] Mon, 25 June 2012 09:16 Go to next message
Emiliano Gonzalez is currently offline Emiliano Gonzalez
Messages: 3
Registered: May 2012
Junior Member
For example, I created two data sources in the report, as I can select which data source to use based on a parameter received?.

I have two identical database with different information and different location, and I want to use the same report to both database where the report chooses where to get the data.

Thanks!
Re: [HELP] Two data sources. [message #891768 is a reply to message #891673] Mon, 25 June 2012 16:18 Go to previous message
Jason Weathersby is currently offline Jason Weathersby
Messages: 9167
Registered: July 2009
Senior Member

You have a bunch of different options here. You could use connection
porfiles, script to change the db url at runtime or swap datasourece or
datasets using scirpt. I am attaching two examples that swap the
datasource or dataset based on a parameter. If you want an example of
change the db url, you can do this in the beforeOpen of a data source like:

extensionProperties.odaURL = "jdbc:mysql://localhost/"+params["mydb"].value;

Jason


On 6/25/2012 9:16 AM, Emiliano Gonzalez wrote:
> For example, I created two data sources in the report, as I can select
> which data source to use based on a parameter received?.
>
> I have two identical database with different information and different
> location, and I want to use the same report to both database where the
> report chooses where to get the data.
>
> Thanks!
Previous Topic:Security access
Next Topic:Suppress Message "The resource of this report item is not reachable"
Goto Forum:
  


Current Time: Sat Aug 23 03:38:19 EDT 2014

Powered by FUDForum. Page generated in 0.01553 seconds