Previous TopicNext Topic


Label

The Label element displays a static line of text. Label text can be externalized. You can use a label with all of the following elements:

The text in the label does not normally contain multiple lines. However, if the text is too long to fit into the available width, BIRT automatically breaks the text into multiple lines. If it is necessary to display multiple lines, the Text element is preferable, especially if you need control over indentation, line spacing, and formatting.

The Label element is a ReportItem and therefore inherits the dataSet property. A label displays static text, however, so it does not make sense to associate a data set with a label.

Extends

DesignElement->ReportElement->ReportItem

Property summary

Method summary

Inherited properties

comments, customXml, dataSet, extends, height, name, paramBindings, style, userProperties

Style properties

backgroundAttachment, backgroundColor, backgroundImage, borderBottomColor, borderBottomStyle, borderBottomWidth, borderLeftColor, borderLeftStyle, borderLeftWidth, borderRightColor, borderRightStyle, borderRightWidth, borderTopColor, borderTopStyle, borderTopWidth, canShrink, color, display, fontFamily, fontSize, fontStyle, fontVariant, fontWeight, letterSpacing, lineHeight, marginBottom, marginLeft, marginRight, marginTop, masterPage, paddingBottom, paddingLeft, paddingRight, paddingTop, pageBreakAfter, pageBreakBefore, showIfBlank, textAlign, textIndent, textLineThrough, textOverline, textTransform, textUnderline, verticalAlign, whiteSpace, wordSpacing

Label properties

The following sections describe the properties of the Label element.

action

Optional hyperlink defined for the label. Like the label itself, the hyperlink is static. Use the Data Item to create a hyperlink that varies depending on the value of data rows.

helpText

Optional tool-tip text that appears when the user hovers the cursor over the item. The help text property is optional. If no text is present, then no tool-tip text appears. The help text can be externalized.

helpTextID

A resource ID for this value, used for externalizing the value of this string.

text

The text to display in the label. The text can be externalized. The text cannot contain internal formatting.

textID

A resource ID for this value, used for externalizing the value of this string.

Label methods

The following sections describe the methods of the Label element.

onCreate

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.

onPrepare

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.

onRender

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.


(c) Copyright Actuate Corporation 2006

Previous TopicNext Topic