![]() ![]() |
The Data element displays data from a data set, an expression, a column, or a parameter. Use a data item with a grid, container, matrix, table, or any item that needs a short, discrete data value.
A data item allows Java-like multi-part formats. One of the common formats 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, BIRT applies the string style. If the expression returns a date, BIRT applies the date style
DesignElement->ReportElement->ReportItem
comments, customXml, dataSet, extends, height, name, paramBindings, style, userProperties
backgroundAttachment, backgroundColor, backgroundImage, borderBottomColor, borderBottomStyle, borderBottomWidth, borderLeftColor, borderLeftStyle, borderLeftWidth, borderRightColor, borderRightStyle, borderRightWidth, borderTopColor, borderTopStyle, borderTopWidth, canShrink, color, dateTimeFormat, display, fontFamily, fontSize, fontStyle, fontVariant, fontWeight, highlightRules, highlightTestExpr, letterSpacing, lineHeight, mapRules, mapTestExpr, marginBottom, marginLeft, marginRight, marginTop, masterPage, numberAlign, numberFormat, paddingBottom, paddingLeft, paddingRight, paddingTop, pageBreakAfter, pageBreakBefore, showIfBlank, stringFormat, textAlign, textLineThrough, textOverline, textTransform, textUnderline, verticalAlign, whiteSpace, wordSpacing
The following sections describe the properties of the Data element.
Optional hyperlink defined for the data item. Like the value expression, the hyperlink is a computed value, and can link to a different resource for every data item instance.
Optional tool-tip text that appears when the user hovers the cursor over the item. Reports often display large amounts of data on a single page. Data items are often short. If this property has no text, no tool-tip text appears. The help text can be externalized, but cannot vary from data item to data item.
A resource ID for this value, used for externalizing the value of this string.
The value to display in the item. The expression is most often a reference to a data set column, but it can also refer to a report parameter, a formula, a special value or other data item.
The expression is usually evaluated when the report is rendered, but it can be evaluated in the generation phase also. Expressions depend only on variables and objects that are available both in the generation and presentation phases.
BIRT automatically determines the type of formatting to apply to the expression based on its return value. If the return value is a number, BIRT applies numeric formatting. If the return value is a date, BIRT applies date and time formatting. If the return value is a string, BIRT applies string formatting. The data item does not have a type. BIRT computes the type independently for every data item.
The following sections describe the methods of the Data element.
The method that BIRT executes to handle the onCreate event for this element. The onCreate method executes every time the element is generated. Use the onCreate method to perform tasks that are data dependent.
The method that BIRT executes to handle the onPrepare event for this element. the onPrepare method executes once prior to the generation of the report. Use onPrepare method to perform tasks that affect the appearance of the element for every occurrence in the report.
The method that BIRT executes to handle the onRender event for this element. The onRender method executes at run time and not at generation time. Use the onRender method to perform tasks that are dependent on the run time details. Examples of run time factors that might require special handling include the run time environment, the user requesting the report, the parameter values in effect when the report is run, and whether the report is produced in HTML or PDF format.
![]() ![]() |