Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » BIRT » Dynamic data source based on parameter(Dynamic data source based on parameter)
Dynamic data source based on parameter [message #1153412] Thu, 24 October 2013 15:44 Go to next message
sudheer kumar is currently offline sudheer kumarFriend
Messages: 11
Registered: September 2013
Junior Member
Hi I have two datasets namely in the library and belows are the names for the dataset
1) wesservice dataset 2) Dataset.


Is there is any way that we can call based on parameters i want to call the dataset.

IF i pass pdataset is parameter and if the value is "Web" it has to call "webservice dataset" and if i pass "data" it has call dataset dynamically..


Please let us know if any one have written how to call based on the parameters it has to read different dataset.

How we can achieve the above scenario what methods we can call and pls share some sample of rpt design.

thanks in advance
Re: Dynamic data source based on parameter [message #1164050 is a reply to message #1153412] Thu, 31 October 2013 11:55 Go to previous message
donino donino is currently offline donino doninoFriend
Messages: 183
Registered: July 2011
Senior Member
A way to do this would be to drop elements in the report design in the "beforeFactory" event.

For example we create two named tables, each of them bound to their respective dataset, and depending on a parameter value we drop the appropriate one. Something like:

var webservice= reportContext.getReportRunnable().designHandle.getDesignHandle().findElement("webservice");
var simpledataset= reportContext.getReportRunnable().designHandle.getDesignHandle().findElement("simpledataset");

if (params["source"]=="webservice"){
  simpledataset.drop();
}else{
  webservice.drop();
}
Previous Topic:Localize drill through tooltip text
Next Topic:can't suppress page breaks
Goto Forum:
  


Current Time: Thu Jul 18 03:26:44 GMT 2024

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

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

Back to the top