java - Birt report Parameter allow multiple value -
i have created parameter type listbox have allowed select multiple values. want use parameter in dataset. used accpet values in other dataset storedprocdurename(?,?) parameter sp. problem filter shows selection if select 1 or more values, while passing sp sends 1 value. how can handle this?
you should @ least post stored procedure, such can see how parameter used. multi-value parameters processed birt java arrays, not data type recognized stored routines. why first item.
therefore assuming parameter sql filter in "in" clause, need pass stored procedure comma-separated string.
declare dataset parameter string, , don't link report parameter set default value expression based on report parameter instead. in example "mymultivalueparam" represents numeric field in database:
params["mymultivalueparam"].value.join(",");
if "mymultivalueparam" represents string need add quotes:
params["mymultivalueparam"].value.join("','");
then use comma-separated string in stored procedure.
Comments
Post a Comment