Cell

Represents a cell element within a grid row or table row.

Description

Each grid or table row contains some number of cells. A cell can span multiple columns. The design need not specify a cell for each column; columns without cells are presumed empty.

If the cell contains more than one item, the items appear vertically within the cell. The developer should generally use a container to better control the positioning of items when the cell contains multiple items.

The cell height and width are optional and are seldom needed. However, they are available for situations where it is required to force a cell to a particular size.

XML Summary

See Also

onCreate

Script executed when the element is created in the Factory.

Description

Executed when the element is created in the Factory. Called after the item is created, but before the item is saved to the report document file. See the scripting spec for additional information about this script. Applications should perform visual customization in the on-render script instead.

onPrepare

It is for a script startup phase. No data binding yet. The design of an element can be changed here.

Description

It is for a script startup phase. No data binding yet. The design of an element can be changed here.

onRender

Script executed when the element is prepared for rendering in the Presentation engine.

Description

Executed when the element is prepared for rendering in the Presentation engine. Changes made to the element are written to the target output format, but not saved to the report document file. This is the preferred place for visual customizations.

style

Name of the style applied to this cell.

Description

Rows provide many style properties. The style properties are defined in the ROM Styles Specification. A cell can inherit its style properties from a parent element, from a named style, or from a style that identifies the context in which the item appears. This property provides the name of the shared style to use.

This cell can also set the value of style properties. Properties set on this element "override" those inherited from a parent element or a shared style.

See Also

Style element in the ROM Styles Specification.

column

The column in which the cell starts.

Notes

Default value: One after the previous column.

Description

The column in which the cell starts. Columns are numbered from 1.

See Also

colSpan

The number of columns that this cell spans.

Description

The number of columns that this cell spans. Defaults 1 one, meaning that the cell appears in only one column.

See Also

rowSpan

The number of rows that this cell spans.

Description

The number of rows that this cell spans. Defaults to 1, meaning the cell appears in only one row.

See Also

height

Minimum cell height.

Notes

Default value: The height is automatically sized to its content.

Description

Minimum cell height. Generally omitted. The size of the cell is the minimum of the height of its contents and the minimum cell height. The final cell height is set by the overall row.

A better practice is to set the height of the row instead the height of a cell.

See Also

width

Minimum cell width.

Notes

Default value: Cell width will be computed by the table or grid based on contents.

Description

Minimum cell width. Can be an absolute or relative width. If omitted, then BIRT or the browser computes the cell width based on content. Many users find it more intuitive to set the width on the column, rather than on individual cells. The overall column width is the minimum of the column width and the width of each cell within the column. All cells are then sized to the width of the column.

See Also

width property of the Column element

drop

Whether the cells defined in this row should expand to fill the entire table or group.

Choices

Description

Whether the cells defined in this row should expand to fill the entire table or group. Allows creating a "drop" header within a table. See explanation in the ROM List and Table Specification. Ignored for grids, and for cells that are not in group headers.

eventHandlerClass

The full qulified name of the event handler class.

Description

Full quilified name of the event handler class, used to specify an external Java class which define the scripting behavior that will be executed at runtime.

See Also

content

Report items that appear inside the cell.

Description

A cell can contain zero, one or more of the following items. The size of the item is defined to be the size of the cell. The (x, y) properties of the item are ignored. The normal case is one item. When a single item appears in a cell, the items within a row are aligned along the text baseline. If multiple items appear within a cell, alignment is undefined. Some rendering environments may baseline-align the first line, others may not.

When multiple items appear within a cell, each item acts a bit like a section: a like break occurs after each item, causing the items to be vertically stacked. The user can set the "display" property of the items to create an in-line layout: items flow from one line to the next with like breaks imposed by the cell width. In-line layout applies to the following only:

When items appear in-line, an implied space separates the items. That is, if a grid has two labels "Sample" and "Labels", and they are marked as in-line, the resulting display is "Sample Label", not "SampleLabel".

Alignment within the cell is set by the elements themselves. When multiple items appear, each can have a distinct horizontal alignment. The set of items as a whole can be vertically aligned by setting all items to the same vertical alignment: top, middle, base-line or center. (Note the caveat above for base-line alignment.) If the multiple items have different vertical alignment, then the behavior is undefined. In BIRT-controlled rendering environments, the vertical alignment is determined by the first element.

The user can also put multiple items in a cell by first adding a container, then adding the other items into the container. A container provides greater control over item positioning, including enhanced ability to place items side-by-side.

See Also