Eclipse BIRT Report Object Model (ROM)

Property Types

Property Types

The following lists the data types used within this specification. The JavaScript types below are the types of the design-time information. See the specification if there is an additional run-time type. (For example, an expression is a string at design time, but will evaluate to a string or integer or other value at runtime.)

A property can be a list: in this case the property is a list of values such as structures, strings, etc.

Property Lists

A list property is defined as being a �list of x� where x can be one of the simple data types, or one of the structures defined below. A list property is represented as an array in JavaScript. For example, the list of custom colors for a report design is represented by a list property. The following obtains the structure that defines the third custom color:

var colorDefn = designDefn.palette[ 2 ];

A property list is composed of a series of values. In general, the values appear in the list in the same order that they appear in the report design XML file, which generally reflects the order in which they were created in the UI.


boolean

A simple true/false value.

Details

Display Name: boolean
Since: 1.0
XML Name: boolean
JavaScript Design Type:
JavaScript Runtime Type:

Description

Provides a simple true/false value. The values are represented by the JavaScript true and false values in scripts and expressions. They are represented as "true" and "false" in the XML file.


choice

The value must be selected from a predefined list of choices.

Details

Display Name: choice
Since: 1.0
XML Name: choice
JavaScript Design Type:
JavaScript Runtime Type:

Description

The choice property type indicates that a property provides a fixed set of choices. Any property of this type must also provide a separate list of the choices. The list of choices is defined as a separate named "choice set."


color

An RGB color value or color name.

Details

Display Name: color
Since: 1.0
XML Name: color
JavaScript Design Type:
JavaScript Runtime Type:

Description

Represents a color. Colors can use the CSS color names, a CSS-format RGB value (#RRGGBB), or a custom color name defined within the report.


contentElement

Details

Display Name: element as property value
Since: 1.0
XML Name: contentElement
JavaScript Design Type:
JavaScript Runtime Type:

dateTime

A date/time value.

Details

Display Name: dateTime
Since: 1.0
XML Name: dateTime
JavaScript Design Type:
JavaScript Runtime Type:

Description

A date/time value in (what format?) Not used in Release 1.


dimension

A physical dimension.

Details

Display Name: dimension
Since: 1.0
XML Name: dimension
JavaScript Design Type:
JavaScript Runtime Type:

Description

A CSS dimension. The units are expressed as a floating point number such as �1.25�. To override that default, specify a suffix as one of �in� (inches), �mm� (millimeters), �cm� (centimeters), �pt� (points), �pc� (picas), �%� (percent), �em� (�em� size for the current font) or �ex� (�ex� size for the current font.)

A dimension is a physical measurement. Dimensions always have a unit. Supported units include the following defined in CSS:

Unit Suffix Meaning
cm Centimeters
in Inches
mm Millimeters
pt Points (1/72 of an inch)
pc Pica (1 pica is equal to 12 points)
px Pixels. (For print, see the CSS spec. A pixel is about 0.21 mm.)
em ems, the height of the element's font
ex x-height, the height of the letter 'x'
% Percentage. The definition of each property identifies the container property from which the value is computed.

element

A reference to another element in the design.

Details

Display Name: element
Since: 1.0
XML Name: element
JavaScript Design Type:
JavaScript Runtime Type:

Description

A reference to another element in the design. BIRT automatically updates the property when the name of the referenced element changes. BIRT will issue an error if the target element does not exist.


elementRef

Details

Display Name: element reference
Since: 1.0
XML Name: elementRef
JavaScript Design Type:
JavaScript Runtime Type:

expression

A JavaScript expression.

Details

Display Name: expression
Since: 1.0
XML Name: expression
JavaScript Design Type:
JavaScript Runtime Type:

Description

A BIRT expression using JavaScript and the BIRT extensions.


extends

Identifies the parent element for elements that extend (inherit from) other elements.

Details

Display Name: extends
Since: 1.0
XML Name: extends
JavaScript Design Type:
JavaScript Runtime Type:

Description

A reference to a parent element of the same type as the derived element. This property type is used in just one place to implement element inheritance.


float

A decimal number such as "1", "1.33" or "2.5."

Details

Display Name: float
Since: 1.0
XML Name: float
JavaScript Design Type:
JavaScript Runtime Type:

Description

A floating-point number. Not used in Release 1.


html

Represents a html value

Details

Display Name: html
Since: 1.0
XML Name: html
JavaScript Design Type:
JavaScript Runtime Type:

Description

Property that stores html value. Model doesn't do validation to this property type.


integer

An integer in the range 0 to 232 - 1.

Details

Display Name: integer
Since: 1.0
XML Name: integer
JavaScript Design Type:
JavaScript Runtime Type:

list

Details

Display Name: list
Since: 1.0
XML Name: list
JavaScript Design Type:
JavaScript Runtime Type:

literalString

Details

Display Name: literal string
Since: 1.0
XML Name: literalString
JavaScript Design Type:
JavaScript Runtime Type:

memberKey

Details

Display Name: member key
Since: 1.0
XML Name: memberKey
JavaScript Design Type:
JavaScript Runtime Type:

name

The name field of a structure within a property defined as a structure list.

Details

Display Name: name
Since: 1.0
XML Name: name
JavaScript Design Type:
JavaScript Runtime Type:

Description

Identifies a property within a structure that provides the name to be used for associative lookup in property lists.

Associative Property Lists

All property lists allow numeric indexes. Some also allow associative lookup using the name of an item in the list. For example, to look up the custom color: �seaGreen�:

var colorDefn = designDefn.palette.seaGreen

or,

var colorDefn = designDefn.palette[ �seaGreen� ]

The first form can be used when the name to be looked up is known when the code is written, and follow the JavaScript identifier naming rules. The second form can be used to look up a value when the value is not known ahead of time, or when the name does not follow JavaScript identifier rules. For example:

var colorDefn = designDefn.palette[ params.colorName ];
var colorDefn = designDefn.palette[ �Sea-Green� ]

The associative lookup is provided when:


number

Arbitrary-precision decimal number

Details

Display Name: number
Since: 1.0
XML Name: number
JavaScript Design Type:
JavaScript Runtime Type:

Description

An arbitrary-precision decimal number. Is accurate enough to represent the largest currency amounts down to two decimal places.


resourceKey

A string that should match a message in the customer's message category.

Details

Display Name: messageId
Since: 1.0
XML Name: resourceKey
JavaScript Design Type:
JavaScript Runtime Type:

Description

A string value, which should match a message in the customer's message category. It allows user to localize an exteralizable property


script

Stores a block of script value that can be executed at runtime.

Details

Display Name: Script
Since: 1.0
XML Name: script
JavaScript Design Type:
JavaScript Runtime Type:

Description

A block of script value that is to be executed at runtime, script are not validated in model at design-time


string

A string value.

Details

Display Name: string
Since: 1.0
XML Name: string
JavaScript Design Type:
JavaScript Runtime Type:

Description

A string value. The string cannot be externalized.


structRef

Represents a reference to another structure.

Details

Display Name: structure reference
Since: 1.0
XML Name: structRef
JavaScript Design Type:
JavaScript Runtime Type:

Description

Simply references to another structure, it can be in two states: resolved or unresolved.


structure

The property is given by a structure

Details

Display Name: Property.struct
Since: 1.0
XML Name: structure
JavaScript Design Type:
JavaScript Runtime Type:

Description

A structure property is one made up of a set of named fields. Structure properties are often lists.


uri

A Uniform Resource Identifier (URI).

Details

Display Name: uri
Since: 1.0
XML Name: uri
JavaScript Design Type:
JavaScript Runtime Type:

Description

A URI of the form "http:", "file:", "iServer:", or "mailto:".


xml

An XML string.

Details

Display Name: xml
Since: 1.0
XML Name: xml
JavaScript Design Type:
JavaScript Runtime Type:

Description

Text in XML format. Is often a fragment of XML rather than a complete file. The use of this property tells the design file writer to enclose the value in a CDATA block.