1

I have created a parameter type listbox where I have allowed to select multiple values. I want to use this parameter in the dataset. I used to accpet values in other dataset with StoredProcdureName(?,?) as parameter to SP. The problem with this filter is that it shows Selection if I select one or more values, but while passing to sp it sends only one value. How can I handle this?

1
  • post the code, please Commented Aug 18, 2014 at 10:39

1 Answer 1

3

You should at least post your stored procedure, such that we can see how this parameter is used. Multi-value parameters are processed by BIRT as java arrays, which is not a data type recognized by stored routines. This is why you only get the first item.

Therefore assuming this parameter is a SQL filter in a "IN" clause, we need to pass it to the stored procedure as a comma-separated String.

Declare your dataset parameter as String, and don't link it to a report parameter but set a default value expression based on the report parameter instead. In this example "myMultivalueParam" represents a numeric field in your database:

params["myMultivalueParam"].value.join(","); 

If "myMultivalueParam" represents a String we need to add quotes:

params["myMultivalueParam"].value.join("','"); 

Then use this comma-separated string in your stored procedure.

Sign up to request clarification or add additional context in comments.

1 Comment

I have called Stored procedure like {call usp_rpt_PartnerLoginReport(?)} And Used ListBox with multiselect option. It is accepting multiple values but while passing to sp it passes only first value and i have handled in sp to select multivalue.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.