How to Enable Multi-Select Parameters in BIRT for RTC Reporting?
![](http://jazz.net/_images/myphoto/6d2650ad4608e334108c47e3e925d64e.jpg)
Hello,
I am using RTC 3.0.1.1 and creating a BIRT report where I want to filter the state of a work item, allowing the user to select more than one state value.
I have added the state list as a parameter with String type, List Box Display type, and a Dynamic list that filters on a data set. I did not select "Allow Multiple Values". For the data set used in the layout, I added a filter on the state row with the Operator as "In" and the Value as the parameter (it's a potential list of values where the only value is the parameter).
When deploying this report it does not work in the web GUI, but when I preview the report it works.
Why is this not working in the web GUI? I have tried changing the filter condition from "In" to "Equals", but it makes no difference. The web GUI report always comes out blank.
Please help!
Thank you and best regards,
Andrew
One answer
![](http://jazz.net/_images/myphoto/6d2650ad4608e334108c47e3e925d64e.jpg)
This is tricky.
To use a multi-select parameter value as a filter in a data set you must firstg parse the value and then tokenize it.
You will need:
- string replace function to remove the ' character in the list (by default multi values are stored as 'value 1','value 2','value 3', etc...)
- string split function to tokenize
you can include this into one statement: params["(parameter name"].value.replace(/'/g,"").split(",");
replace(/'/g,"") will replace all ' with a blank space. g will specify in the regular expression to replace all values, otherwise it just replaces the first value.
If you include this directly as the value in the filter condition, it will work. So as your filter you will have the row "In" and then "params["(parameter name"].value.replace(/'/g,"").split(",");" as the only value in the list (remove first and last " obviously)
Comments
![](http://jazz.net/_images/myphoto/180a68c675d5570337b3e30ae2a59afb.jpg)
Hi Andrew, I tried the above but got the eror message " "The value of the property "valExpr is required" I can still preview the report and see the correct results. Any Ideas?
![](http://jazz.net/_images/myphoto/6d2650ad4608e334108c47e3e925d64e.jpg)
Hi Russell,
Not sure! Are you saying that the report preview in BIRT is working despite the error, or are you saying you get an error once the report has been deployed to RQM?
If you are still working in BIRT, you can debug the report using a javascript debug window by following this guide: http://www.lebirtexpert.com/wordpress/2010/03/03/using-a-popup-debug-window/
Does the error refer to the parsing of the parameter values?
Regards,
Andrew