|
Re: Best way to handle multi select parameter in BIRT 3.7 [message #774288 is a reply to message #772065] |
Tue, 03 January 2012 16:29 |
|
From the api use an array with the correct data type. For example with
an integer use:
Integer parmvals[] = new Integer[3];
parmvals[0]=10104;
parmvals[0]=10105;
parmvals[1]=10106;
task.setParameterValue("parm1", parmvals);
It is best for multi-select parameters to not use a data set parameter
in the query. Just use a beforeOpen script on the dataset to modify the
query. See attached report examples.
Jason
On 12/28/2011 6:10 PM, Alessio Pollero wrote:
> I have a report that have a parameter that is a list that allow multiple
> item selection, How can i bind the multi select parameter to the query
> text ?
> I have to send the parameter from the engine(API), how can i send the
> value for this kind of parameter ? Do i have to send an array of string
> or i have to send the values separated by comma ?
|
|
|
|
Re: Best way to handle multi select parameter in BIRT 3.7 [message #821057 is a reply to message #821017] |
Wed, 14 March 2012 22:01 |
|
In the viewer you just repeat the parameter name ie
&myParmeter=value1&myParameter=value2
I have not tried this with genReport.
Jason
On 3/14/2012 5:10 PM, Lynne Cooley wrote:
> Hello Jason,
> So if you were running this report as a command line with genReport how
> can the parameter "parmorders" be passed in?
> genReport -p "parmorders=[112,114]" ?
> and does this work with dynamic list length also?
>
> -p "parmorders=[112,114,210,330]"
>
> or would it be better to just define the paramter as a string with
> special characters such as "parmorders=112|114|210|220" then parse in
> the beforeOpen script on the dataset to modify the query?
>
> Thank you, Lynne
|
|
|
Powered by
FUDForum. Page generated in 0.03598 seconds