Eclipse BIRT Report Object Model (ROM)

AbstractScalarParameter Element

# Element Overview

Represents the abstract scalar parameter types.

### Details

Display Name: | Abstract ScalarParameter
Since: | 2.5
XML Element: | `None`
Extends: | Parameter
Extendable: | No
Abstract: | Yes
Name Space: | Parameters
Name Requirement: | Optional
Allows User Properties: | Yes
Has Style: | No

### Property Summary

dataSetName
  Refer to a data set for the dynamic selection list.
dataType
  The data type for the parameter.
defaultValue
  The default value of the parameter.
distinct
isRequired
  The flag that indicates whether the value of the parameter is required.
labelExpr
  The prompt for the dynamic choices.
listLimit
  List limitation number.
selectionList
  Defines a selection list for the parameter: static list of values from which the user can choose.
sortBy
  The sort key for parameter values when preview.
sortByColumn
  The expression by which the result sorts.
sortDirection
  The sort order for parameter values when preview.
valueExpr
  The expression to get the value for the choice.
valueType
  The parameter type for this scalar parameter.

### Inherited Properties

comments, customXml, displayName, displayNameID, eventHandlerClass, extends, helpText, helpTextID, hidden, name, newHandlerOnEachEvent, promptText, promptTextID, propertyMasks, userProperties, viewAction

### Inherited Methods

validate

### Description

Represents the abstract scalar parameter types, which defines a single-value parameter.

Abstract scalar parameters can provide a selection list. The list can be static (defined by the `selectionList` property) or dynamic (defined by the `dataSet`, `valueExpr` and `labelExpr` properties.) The user can sort this list by specified key and direction(as controlled by the `sortDirection`, `sortBy` and `sortByColumn` properties).

# Property Detail

## dataSetName Property

Refer to a data set for the dynamic selection list.

### Details

Type: | DataSet Reference
Since: | 2.0
Required: | No
Display Name: | DataSet Name
JavaScript Type: |
Default Value: | None
Inherited: | Yes
Runtime Settable: | No
Property Sheet Visibility: | Visible
Property Sheet Group: | Dynamic list

### Description

Refer to a data set for the selection list. Once this property is set, the selection list is dynamic.

## dataType Property

The data type for the parameter.

### Details

Type: | choice (paramType)
Since: | 1.0
Required: | No
Display Name: | Data type
JavaScript Type: |
Default Value: | string
Inherited: | Yes
Runtime Settable: | No
Property Sheet Visibility: | Visible
Property Sheet Group: | Top

### Choices

Name | Display Name | Value | Description
string | String | string |
float | Float | float |
decimal | Decimal | decimal |
dateTime | Date Time | dateTime |
boolean | Boolean | boolean |
integer | Integer | integer |
date | Date | date |
time | Time | time |
javaObject | Java Object | javaObject |

### Description

The data type for the parameter. The data type controls how the Requester formats, parses and validates the parameter. Every type can optionally provide a choice list. And, the parameter can require that the user select one of the choices.

### See Also

`selectionList` property

`defaultValue` property

## defaultValue Property

The default value of the parameter.

### Details

Type: | list
Since: | 1.0
Required: | No
Display Name: | Default value
JavaScript Type: |
Default Value: | None
Inherited: | Yes
Runtime Settable: | No
Property Sheet Visibility: | Visible
Property Sheet Group: | Top

### Description

The default value for the parameter. The default value can be an expression, but cannot reference any other parameters.

## distinct Property

### Details

Type: | boolean
Since: | 2.2
Required: | No
Display Name: | Distinct
JavaScript Type: |
Default Value: | true
Inherited: | Yes
Runtime Settable: | No
Property Sheet Visibility: | Visible
Property Sheet Group: | Top

## isRequired Property

The flag that indicates whether the value of the parameter is required.

### Details

Type: | boolean
Since: | 2.2
Required: | No
Display Name: | Is required
JavaScript Type: |
Default Value: | true
Inherited: | Yes
Runtime Settable: | No
Property Sheet Visibility: | Visible
Property Sheet Group: | Top

### Description

The flag indicates whether the value of the parameter is required. `true` if the value of the parameter is required. For string type parameter, if the value is required, it cannot be `null` or empty. For other type parameters, required value cannot be `null`.

## labelExpr Property

The prompt for the dynamic choices.

### Details

Type: | expression
Context: |
Expression Type: | string
Since: | 2.0
Required: | No
Display Name: | Label expression
JavaScript Type: |
Default Value: | None
Inherited: | Yes
Runtime Settable: | No
Property Sheet Visibility: | Visible
Property Sheet Group: | Dynamic list

### Description

An expression that returns the display value for each row in the dynamic list.

### See Also

`valueExpr` property

## listLimit Property

List limitation number.

### Details

Type: | integer
Since: | 2.0
Required: | No
Display Name: | List limit
JavaScript Type: |
Default Value: | None
Inherited: | Yes
Runtime Settable: | No
Property Sheet Visibility: | Visible
Property Sheet Group: | Top

### Description

Value for the list limitation number. If the limitation is provided, only the top-n choices will be available in the parameter request dialog.

## selectionList Property

Defines a selection list for the parameter: static list of values from which the user can choose.

### Details

Type: | List of SelectionChoice Structures
Since: | 1.0
Required: | No
Display Name: | Selection list
JavaScript Type: |
Default Value: | None
Inherited: | Yes
Runtime Settable: | No
Property Sheet Visibility: | Hidden
Property Sheet Group: | Top

### Description

The parameter selection list provides a developer-defined list of choices. Every choice has two parts: a choice and a label. The label can be externalized and appears in the UI. The choice is the value passed to the report. For example, labels may be "Open" and "Closed", while the values are 0 and 1.

The items in the list are of the type given by the parameter data type.

## sortBy Property

The sort key for parameter values when preview.

### Details

Type: | choice (paramSortValues)
Since: | 2.2
Required: | No
Display Name: | Sort by
JavaScript Type: |
Default Value: | None
Inherited: | Yes
Runtime Settable: | No
Property Sheet Visibility: | Visible
Property Sheet Group: | Top

### Choices

Name | Display Name | Value | Description
value | Value | value |
label | Display Text | label |

### Description

The sort key for parameter values when preview.Its value can be label or value.

## sortByColumn Property

The expression by which the result sorts.

### Details

Type: | expression
Context: |
Expression Type: | None
Since: | 2.3
Required: | No
Display Name: | Sort by column
JavaScript Type: |
Default Value: | None
Inherited: | Yes
Runtime Settable: | No
Property Sheet Visibility: | Visible
Property Sheet Group: | Top

### Description

The expression by which the result sorts.

## sortDirection Property

The sort order for parameter values when preview.

### Details

Type: | choice (sortDirection)
Since: | 2.2
Required: | No
Display Name: | Sort direction
JavaScript Type: |
Default Value: | None
Inherited: | Yes
Runtime Settable: | No
Property Sheet Visibility: | Visible
Property Sheet Group: | Top

### Choices

Name | Display Name | Value | Description
asc | Ascending | asc |
desc | Descending | desc |

### Description

The sort order for parameter values when preview. Its value can be asc or desc.

## valueExpr Property

The expression to get the value for the choice.

### Details

Type: | expression
Context: |
Expression Type: | any
Since: | 2.0
Required: | No
Display Name: | Value expression
JavaScript Type: |
Default Value: | None
Inherited: | Yes
Runtime Settable: | No
Property Sheet Visibility: | Visible
Property Sheet Group: | Dynamic list

### Description

The expression on the data row from the dynamic list data set that returns the value for the choice.

### See Also

`lableExpr` property

## valueType Property

The parameter type for this scalar parameter.

### Details

Type: | choice (paramValueType)
Since: | 2.0
Required: | No
Display Name: | Value type
JavaScript Type: |
Default Value: | static
Inherited: | Yes
Runtime Settable: | No
Property Sheet Visibility: | Visible
Property Sheet Group: | Top

### Choices

Name | Display Name | Value | Description
static | Static | static |
dynamic | Dynamic | dynamic |

### Description

The parameter type for this scalar parameter. Its value can be dynamic or static.