user2791560
user2791560

Reputation: 57

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

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>

Upvotes: 0

Views: 135

Answers (1)

Rohith Aggithaya
Rohith Aggithaya

Reputation: 1

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.

Upvotes: 0

Related Questions