Jazz Forum Welcome to the Jazz Community Forum Connect and collaborate with IBM Engineering experts and users

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

2 votes



One answer

Permanent link
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)

3 votes

Comments

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? 

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

Register or log in to post 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.

Search context
Follow this question

By Email: 

Once you sign in you will be able to subscribe for any updates here.

By RSS:

Answers
Answers and Comments
Question details
× 6,132

Question asked: Oct 07 '12, 10:47 a.m.

Question was seen: 13,980 times

Last updated: Jun 15 '13, 6:58 a.m.

Confirmation Cancel Confirm