Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » BIRT » Parameter with multiple entry(Entering multiple value in parameter box)
Parameter with multiple entry [message #1696900] Fri, 29 May 2015 09:58 Go to next message
hatra atrin is currently offline hatra atrinFriend
Messages: 20
Registered: February 2014
Junior Member
Hi All,
I have a new requirement where client wants to enter multiple product code into the parameter text box when they run the report, this values may go to 10s of values. reports run from a sql function and product code is already passed to it as this is a existing parameter. we don't want to modify the function and want to implement the parameter in report designer.
correctly parameter works as we put the value in parameter box "123456" and runs for all product codes with that value.
now we want to be able to enter "123456, 234567, 3456789, etc"
any help appreciate it
Re: Parameter with multiple entry [message #1697679 is a reply to message #1696900] Fri, 05 June 2015 21:14 Go to previous message
Jesse Freeman is currently offline Jesse FreemanFriend
Messages: 184
Registered: January 2015
Senior Member
I think this a duplicate of another post: https://www.eclipse.org/forums/index.php/t/1066893/

Regardless, here is the answer:
You will need to modify the query text in the beforeOpen of the data set with some script to dynamically parse the values of your parameter and add them into the query.
For Example:
var ordersArray = (params["OrderNumber"].value).split(",");
for(var x=0; x<ordersArray.length; x++){
	if(this.queryText.toLowerCase().indexOf("where") != -1){
		this.queryText = this.queryText + " or CLASSICMODELS.ORDERS.ORDERNUMBER = " + ordersArray[x];
	}else{
		this.queryText = this.queryText + " where CLASSICMODELS.ORDERS.ORDERNUMBER = " + ordersArray[x];
	}
}
Previous Topic:Manage webservice string return data as XML
Next Topic:Dynamic table header on pagebreak
Goto Forum:
  


Current Time: Fri Apr 26 17:53:02 GMT 2024

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

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

Back to the top