How to Enable Multi-Select Parameters in BIRT for RTC Reporting?
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
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:
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
Russell Norlund
commented Jun 15 '13, 4:44 a.m.
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?
Andrew Trobec
commented Jun 15 '13, 6:58 a.m.
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
|
Your answer
Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.