How to send values selected in ListBox to java webservice parameter in BIRT?

128 Views Asked by At

I have a java webservice which takes values of Locations and performs action. In my BIRT report, I have a ListBox which contains names of all the locations. When tried to link values from ListBox to webservice parameter, BIRT developer give warning message as :

If a user selects multiple values from report parameter, the data set parameter uses only the first value

.

I tried creating a hidden report parameter [RP_Hidden_Locations] in BIRT which is of string type and copied values from ListBox report parameter [RP_All_Locations] as [RP_Hidden_Locations].value = params["RP_All_Locations"].value.join("','");

This didn't work and null values were received in webservice method.

Please help!

PS: Data source for Data Set in BIRT is Webserivce Data Source and sending report parameter values as shown below

<locations>?&RP_Hidden_Locations&?</locations>
1

There are 1 best solutions below

0
On

First Create the hidden variable. In the script tab of the dataset, select before open.Here join all the values sent by the listbox report parameter. Use this:

params[RP_Hidden_Locations]= "'"+params["RP_All_Locations"].value.join("','")+"'";

Now set the SOAP Request to send this hidden parameter.