Eclipse BIRT Report Object Model (ROM)

Table Element

# Element Overview

Presents data from a data set in using a tabular layout.

### Details

Display Name: | Table
Since: | 1.0
XML Element: | `table`
Extends: | Listing
Extendable: | Yes
Abstract: | No
Name Space: | Report Items
Name Requirement: | Optional
Allows User Properties: | Yes
Has Style: | Yes
Default Style: | table

### Property Summary

caption
  Text to appear as a table caption in HTML.
captionID
isSummaryTable
summary

### Method Summary

onCreate
  Script executed when the element is created in the Factory.
onPageBreak
onPrepare
  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.

### Slot Summary

header
  Rows to appear at the top of the table, and optionally at the top of each page.
groups
  Level breaks within the data. Each has its own header & footer.
detail
  Rows to display for each row in the data set.
footer
  Rows to appear at the bottom of the table.
columns
  A list of Column elements that describe the table columns.

### Inherited Properties

ACLExpression, allowExport, bookmark, bookmarkDisplayName, boundDataColumns, cascadeACL, comments, cube, customXml, dataBindingRef, dataSet, displayName, displayNameID, eventHandlerClass, extends, filter, height, multiViews, name, newHandlerOnEachEvent, pageBreakInterval, paramBindings, propertyMasks, pushDown, refTemplateParameter, repeatHeader, sort, sortByGroups, style, toc, userProperties, viewAction, visibility, width, x, y, zIndex

### Style Properties

backgroundAttachment, backgroundColor, backgroundImage, backgroundPositionX, backgroundPositionY, backgroundRepeat, backgroundSizeHeight, backgroundSizeWidth, bidiTextDirection, borderBottomColor, borderBottomStyle, borderBottomWidth, borderLeftColor, borderLeftStyle, borderLeftWidth, borderRightColor, borderRightStyle, borderRightWidth, borderTopColor, borderTopStyle, borderTopWidth, canShrink, color, dateFormat, dateTimeFormat, display, fontFamily, fontSize, fontStyle, fontVariant, fontWeight, highlightRules, letterSpacing, lineHeight, mapRules, marginBottom, marginLeft, marginRight, marginTop, masterPage, numberAlign, numberFormat, orphans, paddingBottom, paddingLeft, paddingRight, paddingTop, pageBreakAfter, pageBreakBefore, pageBreakInside, showIfBlank, stringFormat, textAlign, textIndent, textLineThrough, textOverline, textTransform, textUnderline, timeFormat, verticalAlign, whiteSpace, widows, wordSpacing

### Description

A table presents the rows from a data set in a tabular arrangement. The columns property is optional and defines the columns. The header appears at the top of the table, and on each new page. The table can contain groups. The footer displays totals and appears at the bottom of the table. The detail appears for every row in the data set.

A table can omit the data set. In this case, it displays a set of rows defined by its container. See the "Combining a List and a Table with a Single Data Set" section below for details.

# Property Detail

## caption Property

Text to appear as a table caption in HTML.

### Details

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

### Description

This property provides text to appear as the table caption in HTML. The text can be localized. From the HTML 4.0 spec:

When present, the CAPTION element's text should describe the nature of the table. ? Visual user agents allow sighted people to quickly grasp the structure of the table from the headings as well as the caption. A consequence of this is that captions will often be inadequate as a summary of the purpose and structure of the table from the perspective of people relying on non-visual user agents.

## captionID Property

### Details

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

## isSummaryTable Property

### Details

Type: | boolean
Since: | 2.5
Required: | No
Display Name: | Is summary table
JavaScript Type: |
Default Value: | false
Inherited: | Yes
Runtime Settable: | No
Property Sheet Visibility: | Visible
Property Sheet Group: | Top

## summary Property

### Details

Type: | string
Since: | 2.3
Required: | No
Display Name: | Summary
JavaScript Type: |
Default Value: | None
Inherited: | Yes
Runtime Settable: | No
Property Sheet Visibility: | Visible
Property Sheet Group: | Top

# Method Detail

## onCreate Method

Script executed when the element is created in the Factory.

### Synopsis

`None obj.onCreate( )`

### Details

Since: | 1.0
Context: | factory
Arguments: | None
Return Type: | None

### 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.

## onPageBreak Method

### Synopsis

`None obj.onPageBreak( )`

### Details

Since: | 2.1
Context: | presentation
Arguments: | None
Return Type: | None

## onPrepare Method

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

### Synopsis

`None obj.onPrepare( )`

### Details

Since: | 2.0
Context: | startup
Arguments: | None
Return Type: | None

### Description

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

## onRender Method

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

### Synopsis

`None obj.onRender( )`

### Details

Since: | 1.0
Context: | presentation
Arguments: | None
Return Type: | None

### 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.

# Slot Detail

## header Slot

Rows to appear at the top of the table, and optionally at the top of each page.

### Details

Display Name: | Header
Since: | 1.0
XML Element: | `header`
Contents: | List of Row
Default Style: | table-header

### Description

The table header appears at the top of the table, and optionally at the top of each page. The table header usually contains column headings. Unlike a list, the table header is not designed to display introductory information. Instead, to display such information, use the table combined with a list as described in the "Combining a List and a Table with a Single Data Set" section below.

## groups Slot

Level breaks within the data. Each has its own header & footer.

### Details

Display Name: | Groups
Since: | 1.0
XML Element: | None. (The contents appear directly within the container element.)
Contents: | List of TableGroup
Default Style: | None

### Description

Groups provide a way of organizing data within a table. Groups appear from the most general (outermost) to the most specific (innermost). For example, a table can display sales by sales region and sales rep. The region and rep represent groups. The region is the outermost group. The rep is the innermost group.

## detail Slot

Rows to display for each row in the data set.

### Details

Display Name: | Detail
Since: | 1.0
XML Element: | `detail`
Contents: | List of Row
Default Style: | table-detail

### Description

The detail rows appear for each row in the data set. Rows can be conditionally selected. For example, an accounting report can display a different row for debits vs. credits.

## footer Slot

Rows to appear at the bottom of the table.

### Details

Display Name: | Footer
Since: | 1.0
XML Element: | `footer`
Contents: | List of Row
Default Style: | table-footer

### Description

The footer defines a set of rows to appear at the bottom of a table. The footer often contains totals.

## columns Slot

A list of Column elements that describe the table columns.

### Details

Display Name: | Columns
Since: | 1.0
XML Element: | None. (The contents appear directly within the container element.)
Contents: | List of Column
Default Style: | None

### Description

This slot describes the columns within the table. This column definitions are optional. If omitted, BIRT infers the columns from the table structure itself, and BIRT will size the columns based on their contents. If provided, then the table must contain no more than the number of columns described. Use this property when you want to control the size, color, border, or other properties of each column.

### See Also

The Column Definition structure in the ROM Layout Specification.