|
Re: How to get all default values of scalar parameter [message #832394 is a reply to message #831835] |
Fri, 30 March 2012 04:45 |
|
Try this:
IScalarParameterDefn scalar = (IScalarParameterDefn) param;
ScalarParameterHandle myhandle = (ScalarParameterHandle)
param.getHandle();
ArrayList myvals = (ArrayList) myhandle.getDefaultValueList();
Check to see if myvals is not null and then iterate it.
Jason
On 3/29/2012 8:19 AM, Eric Düll wrote:
> Hi everybody,
>
> the following snippet shows a "multiple-value" birt report parameter,
> that has more than one default value. IScalarParameterDefn only returns
> me teh first default parameter --> getDefaultValue()
>
>
> IGetParameterDefinitionTask.getSelectionList( "param_listbox_multiple"
> ).getDefaultValue(); //returns only M02
>
> Can anyone tell me how I get the list of all default values {"M02", "A01"}
>
> Thanks a lot, Eric
>
>
> <scalar-parameter name="param_listbox_multiple" id="77">
> <text-property name="helpText">Welche Vorerkrankungen hatten sie bisher
> (mehrere Antworten möglich. Default ist Mumps und Angina)</text-property>
> <text-property name="promptText">Vorerkrankungen</text-property>
> <property name="valueType">static</property>
> <property name="dataType">string</property>
> <property name="distinct">true</property>
> <simple-property-list name="defaultValue">
> <value type="constant">M02</value>
> <value type="constant">A01</value>
> </simple-property-list>
> <list-property name="selectionList">
> <structure>
> <property name="value">M01</property>
> <property name="label">Masern</property>
> </structure>
> <structure>
> <property name="value">M02</property>
> <property name="label">Mumps</property>
> </structure>
> <structure>
> <property name="value">R1</property>
> <property name="label">Röteln</property>
> </structure>
> <structure>
> <property name="value">A01</property>
> <property name="label">Angina</property>
> </structure>
> </list-property>
> <property name="paramType">multi-value</property>
> <property name="controlType">list-box</property>
> <property name="mustMatch">true</property>
> <property name="fixedOrder">true</property>
> <structure name="format">
> <property name="category">Unformatted</property>
> </structure>
> </scalar-parameter>
>
>
|
|
|
|
Powered by
FUDForum. Page generated in 0.03410 seconds