Eclipse BIRT Report Object Model (ROM)
Data Element
Display Name: | Data |
Since: | 1.0 |
XML Element: | data |
Extends: | ReportItem |
Extendable: | Yes |
Abstract: | No |
Name Space: | Report Items |
Name Requirement: | Optional |
Allows User Properties: | Yes |
Has Style: | Yes |
Default Style: | data |
ACLExpression, allowExport, bookmark, bookmarkDisplayName, boundDataColumns, cascadeACL, comments, cube, customXml, dataBindingRef, dataSet, displayName, displayNameID, eventHandlerClass, extends, height, multiViews, name, newHandlerOnEachEvent, paramBindings, propertyMasks, pushDown, refTemplateParameter, style, toc, userProperties, viewAction, visibility, width, x, y, zIndex
backgroundAttachment, backgroundColor, backgroundImage, backgroundPositionX, backgroundPositionY, backgroundRepeat, bidiTextDirection, borderBottomColor, borderBottomStyle, borderBottomWidth, borderLeftColor, borderLeftStyle, borderLeftWidth, borderRightColor, borderRightStyle, borderRightWidth, borderTopColor, borderTopStyle, borderTopWidth, canShrink, color, 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, textLineThrough, textOverline, textTransform, textUnderline, verticalAlign, whiteSpace, widows, wordSpacing
A data element displays data from a data set, an expression, a parameter, etc. Data items display the value of a column, parameter or expression. Data items are for use with grids, containers, matrices, tables and other items that need a short, discrete data value.
Data items allow Java-like multi-part formats: One of the common formats used by some people is: #,##0_);(#,##0);"---". See the Style element for a description of the available styles.
BIRT applies one of the predefined styles depending on
the data value of the item. If the expression returns a number, then BIRT
applies the number
style. If the expression
returns a string, then BIRT applies the string
style. And, if the expression returns a date, then BIRT applies the
date
style.
Label element
Multi-line Data element
Style element
Optional hyperlink defined for the data item.
Type: | Action Structure |
Since: | 1.0 |
Required: | No |
Display Name: | Action |
JavaScript Type: | |
Default Value: | None |
Inherited: | Yes |
Runtime Settable: | No |
Property Sheet Visibility: | Hidden |
Property Sheet Group: | Top |
Optional hyperlink defined for the data item. Like the value expression, the hyperlink is computed, and can link to a different resource for each data item instance.
Action structure
Optional tool-tip text that appears when the user hovers the cursor over the item.
Type: | string |
Since: | 1.0 |
Required: | No |
Display Name: | Help text |
JavaScript Type: | |
Default Value: | None |
Inherited: | Yes |
Runtime Settable: | No |
Property Sheet Visibility: | Visible |
Property Sheet Group: | Top |
Reports often display large amounts of data on a single page. Data items are often short. While this works well once the user is familiar with the meaning of each data string/value, it can make the report confusing to the first-time user. Help-text helps bridge the gap. It allows the user to display a number, such as the Return on Investment (ROI) for an asset in the report. If the user needs more information, he can hover the cursor over the label and help text will appear that says something like, "Return on Investment: defined as the ratio of profit to funds invested."
The help text is optional. If no text is present, then no tool-tip text will appear. The help text can be externalized. The help text is static, it cannot vary for each data item.
Type: | resourceKey |
Since: | 1.0 |
Required: | No |
Display Name: | Help text key |
JavaScript Type: | |
Default Value: | None |
Inherited: | Yes |
Runtime Settable: | Yes |
Property Sheet Visibility: | Visible |
Property Sheet Group: | Top |
The bound column name refers to the value to display in the item.
Type: | string |
Since: | 2.1 |
Required: | No |
Display Name: | Result set column |
JavaScript Type: | |
Default Value: | None |
Inherited: | Yes |
Runtime Settable: | Yes |
Property Sheet Visibility: | Visible |
Property Sheet Group: | Top |
The bound column name refers to the value to display in the item. Through the boudn column, it can also reference a report parameter, a formula, a special value or other data item.
The expression is usually evaluated when the report is rendered, not in the Factory, though it may be evaluated in the Factory also. Expressions should depend only on variables and objects available both in the Factory and Presentation Engine. See the ROM Scripting Specification for details.
BIRT automatically determines the type of formatting to apply based on the actual return value of each expression. If the return value is a Number, BIRT applies numeric formatting. If the return value is a Date, BIRT applies date/time formatting. If the return value is a String, BIRT applies string formatting. The data item itself does not have a type; the type is computed independently for each and every data item based on the return value of this expression.
Script executed when the element is created in the Factory.
None obj.onCreate( )
Since: | 1.0 |
Context: | factory |
Arguments: | None |
Return Type: | None |
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.
None obj.onPageBreak( )
Since: | 2.1 |
Context: | presentation |
Arguments: | None |
Return Type: | None |
It is for a script startup phase. No data binding yet. The design of an element can be changed here.
None obj.onPrepare( )
Since: | 2.0 |
Context: | startup |
Arguments: | None |
Return Type: | None |
It is for a script startup phase. No data binding yet. The design of an element can be changed here.
Script executed when the element is prepared for rendering in the Presentation engine.
None obj.onRender( )
Since: | 1.0 |
Context: | presentation |
Arguments: | None |
Return Type: | None |
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.