Skip to main content



      Home
Home » Archived » BIRT » Best way to handle multi select parameter in BIRT 3.7(What's the best way to handle multi select parameters in BIRT 3.7 ?)
Best way to handle multi select parameter in BIRT 3.7 [message #772065] Wed, 28 December 2011 18:10 Go to next message
Eclipse UserFriend
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 #774288 is a reply to message #772065] Tue, 03 January 2012 11:29 Go to previous messageGo to next message
Eclipse UserFriend
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 #821017 is a reply to message #774288] Wed, 14 March 2012 17:10 Go to previous messageGo to next message
Eclipse UserFriend
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
Re: Best way to handle multi select parameter in BIRT 3.7 [message #821057 is a reply to message #821017] Wed, 14 March 2012 18:01 Go to previous message
Eclipse UserFriend
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
Previous Topic:Cannot open the connection for the driver: org.eclipse.birt.report.data.oda.jdbc
Next Topic:What's New - 3.7.2
Goto Forum:
  


Current Time: Tue Jul 22 15:22:49 EDT 2025

Powered by FUDForum. Page generated in 0.03618 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top