Skip to main content



      Home
Home » Archived » BIRT » Cotumising birt parameter
Cotumising birt parameter [message #1666094] Wed, 11 March 2015 10:37 Go to next message
Eclipse UserFriend
Hello,
I'm using birt report and i wanna to use case when on my birt parameter. the default value of my parameter is 123, i want when u shoose the default value i want to get years between 2010 and 2015 else y get the result of the value of my parameter i created a parameter named paramyears and i use this query:

select table1.CA , table1.name from table1 where (params["paramyears"].values == 123 and table1.years between 2010 and 2015) or (params["paramyears"].values != 123 and params["paramyears"].values=table1.years)
Thank you
Re: Cotumising birt parameter [message #1666582 is a reply to message #1666094] Wed, 11 March 2015 15:18 Go to previous message
Eclipse UserFriend
You can use javascript in the beforeOpen of the Data Set to perform your desired logic and then override the query using this.queryText.

For Example:
if(params["paramyears"] == 123){
this.queryText = this.queryText + " where table1.year between 2010 and 2015";
}else{
this.queryText = this.queryText + " where table1.year =" + params["paramyears"];
}
Previous Topic:Radar chart
Next Topic:Canceling rendering when resultset is empty
Goto Forum:
  


Current Time: Fri Mar 21 23:55:45 EDT 2025

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

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

Back to the top