| <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 transitional//EN"> |
| <html> |
| <head> |
| <title>Data Element (Eclipse BIRT ROM Documentation)</title> |
| <link rel="stylesheet" href="../style/style.css" type="text/css"/> |
| <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> |
| </head> |
| <body> |
| <p class="title">Eclipse BIRT Report Object Model (ROM)</p> |
| <p class="subtitle">Data Element</p> |
| <h1>Element Overview</h1> |
| <div class="section-text"> |
| Displays a data set or computed value with optional |
| formatting.</div> |
| <h3>Details</h3> |
| |
| <table class="detail-table"> |
| <tr><td>Display Name:</td> |
| <td>Data</td></tr> |
| <tr><td>Since:</td> |
| <td>1.0</td></tr> |
| <tr><td>XML Element:</td> |
| <td><code>data</code></td></tr> |
| <tr><td>Extends:</td> |
| <td><a href="ReportItem.html">ReportItem</a></td></tr> |
| <tr><td>Extendable:</td> |
| <td>Yes</td></tr> |
| <tr><td>Abstract:</td> |
| <td>No</td></tr> |
| <tr><td>Name Space:</td> |
| <td>Report Items</td></tr> |
| <tr><td>Name Requirement:</td> |
| <td>Optional</td></tr> |
| <tr><td>Allows User Properties:</td> |
| <td>Yes</td></tr> |
| <tr><td>Has Style:</td> |
| <td>Yes</td></tr> |
| <tr><td>Default Style:</td> |
| <td><a href="../styles.html#data">data</a></td></tr> |
| </table> |
| |
| <h3>Property Summary</h3> |
| |
| <dl class="section-text"> |
| <dt><a href="#Property-action">action</a></dt> |
| <dd>Optional hyperlink defined for the data item.</dd> |
| <dt><a href="#Property-helpText">helpText</a></dt> |
| <dd>Optional tool-tip text that appears when the user hovers the cursor over the item.</dd> |
| <dt><a href="#Property-helpTextID">helpTextID</a></dt> |
| <dd></dd> |
| <dt><a href="#Property-resultSetColumn">resultSetColumn</a></dt> |
| <dd>The bound column name refers to the value to display in the item.</dd> |
| </dl> |
| |
| <h3>Method Summary</h3> |
| |
| <dl class="section-text"> |
| <dt><a href="#Method-onCreate">onCreate</a></dt> |
| <dd>Script executed when the element is created in the Factory.</dd> |
| <dt><a href="#Method-onPageBreak">onPageBreak</a></dt> |
| <dd></dd> |
| <dt><a href="#Method-onPrepare">onPrepare</a></dt> |
| <dd>It is for a script startup phase. No data binding yet. The design of an element can be changed here.</dd> |
| <dt><a href="#Method-onRender">onRender</a></dt> |
| <dd>Script executed when the element is prepared for rendering in the Presentation engine.</dd> |
| </dl> |
| |
| <h3>Inherited Properties</h3> |
| |
| <p class="section-text"> |
| <a href="ReportItem.html#Property-bookmark">bookmark</a>, |
| <a href="ReportItem.html#Property-boundDataColumns">boundDataColumns</a>, |
| <a href="ReportElement.html#Property-comments">comments</a>, |
| <a href="ReportItem.html#Property-cube">cube</a>, |
| <a href="DesignElement.html#Property-customXml">customXml</a>, |
| <a href="ReportItem.html#Property-dataBindingRef">dataBindingRef</a>, |
| <a href="ReportItem.html#Property-dataSet">dataSet</a>, |
| <a href="ReportElement.html#Property-displayName">displayName</a>, |
| <a href="ReportElement.html#Property-displayNameID">displayNameID</a>, |
| <a href="ReportElement.html#Property-eventHandlerClass">eventHandlerClass</a>, |
| <a href="ReportElement.html#Property-extends">extends</a>, |
| <a href="ReportItem.html#Property-height">height</a>, |
| <a href="ReportElement.html#Property-name">name</a>, |
| <a href="ReportItem.html#Property-paramBindings">paramBindings</a>, |
| <a href="DesignElement.html#Property-propertyMasks">propertyMasks</a>, |
| <a href="ReportItem.html#Property-refTemplateParameter">refTemplateParameter</a>, |
| <a href="ReportItem.html#Property-style">style</a>, |
| <a href="ReportItem.html#Property-toc">toc</a>, |
| <a href="DesignElement.html#Property-userProperties">userProperties</a>, |
| <a href="ReportElement.html#Property-viewAction">viewAction</a>, |
| <a href="ReportItem.html#Property-visibility">visibility</a>, |
| <a href="ReportItem.html#Property-width">width</a>, |
| <a href="ReportItem.html#Property-x">x</a>, |
| <a href="ReportItem.html#Property-y">y</a>, |
| <a href="ReportItem.html#Property-zIndex">zIndex</a> |
| </p> |
| <h3>Style Properties</h3> |
| |
| <p class="section-text"> |
| <a href="Style.html#Property-backgroundAttachment">backgroundAttachment</a>, |
| <a href="Style.html#Property-backgroundColor">backgroundColor</a>, |
| <a href="Style.html#Property-backgroundImage">backgroundImage</a>, |
| <a href="Style.html#Property-backgroundPositionX">backgroundPositionX</a>, |
| <a href="Style.html#Property-backgroundPositionY">backgroundPositionY</a>, |
| <a href="Style.html#Property-backgroundRepeat">backgroundRepeat</a>, |
| <a href="Style.html#Property-borderBottomColor">borderBottomColor</a>, |
| <a href="Style.html#Property-borderBottomStyle">borderBottomStyle</a>, |
| <a href="Style.html#Property-borderBottomWidth">borderBottomWidth</a>, |
| <a href="Style.html#Property-borderLeftColor">borderLeftColor</a>, |
| <a href="Style.html#Property-borderLeftStyle">borderLeftStyle</a>, |
| <a href="Style.html#Property-borderLeftWidth">borderLeftWidth</a>, |
| <a href="Style.html#Property-borderRightColor">borderRightColor</a>, |
| <a href="Style.html#Property-borderRightStyle">borderRightStyle</a>, |
| <a href="Style.html#Property-borderRightWidth">borderRightWidth</a>, |
| <a href="Style.html#Property-borderTopColor">borderTopColor</a>, |
| <a href="Style.html#Property-borderTopStyle">borderTopStyle</a>, |
| <a href="Style.html#Property-borderTopWidth">borderTopWidth</a>, |
| <a href="Style.html#Property-canShrink">canShrink</a>, |
| <a href="Style.html#Property-color">color</a>, |
| <a href="Style.html#Property-dateTimeFormat">dateTimeFormat</a>, |
| <a href="Style.html#Property-display">display</a>, |
| <a href="Style.html#Property-fontFamily">fontFamily</a>, |
| <a href="Style.html#Property-fontSize">fontSize</a>, |
| <a href="Style.html#Property-fontStyle">fontStyle</a>, |
| <a href="Style.html#Property-fontVariant">fontVariant</a>, |
| <a href="Style.html#Property-fontWeight">fontWeight</a>, |
| <a href="Style.html#Property-highlightRules">highlightRules</a>, |
| <a href="Style.html#Property-letterSpacing">letterSpacing</a>, |
| <a href="Style.html#Property-lineHeight">lineHeight</a>, |
| <a href="Style.html#Property-mapRules">mapRules</a>, |
| <a href="Style.html#Property-marginBottom">marginBottom</a>, |
| <a href="Style.html#Property-marginLeft">marginLeft</a>, |
| <a href="Style.html#Property-marginRight">marginRight</a>, |
| <a href="Style.html#Property-marginTop">marginTop</a>, |
| <a href="Style.html#Property-masterPage">masterPage</a>, |
| <a href="Style.html#Property-numberAlign">numberAlign</a>, |
| <a href="Style.html#Property-numberFormat">numberFormat</a>, |
| <a href="Style.html#Property-orphans">orphans</a>, |
| <a href="Style.html#Property-paddingBottom">paddingBottom</a>, |
| <a href="Style.html#Property-paddingLeft">paddingLeft</a>, |
| <a href="Style.html#Property-paddingRight">paddingRight</a>, |
| <a href="Style.html#Property-paddingTop">paddingTop</a>, |
| <a href="Style.html#Property-pageBreakAfter">pageBreakAfter</a>, |
| <a href="Style.html#Property-pageBreakBefore">pageBreakBefore</a>, |
| <a href="Style.html#Property-pageBreakInside">pageBreakInside</a>, |
| <a href="Style.html#Property-showIfBlank">showIfBlank</a>, |
| <a href="Style.html#Property-stringFormat">stringFormat</a>, |
| <a href="Style.html#Property-textAlign">textAlign</a>, |
| <a href="Style.html#Property-textLineThrough">textLineThrough</a>, |
| <a href="Style.html#Property-textOverline">textOverline</a>, |
| <a href="Style.html#Property-textTransform">textTransform</a>, |
| <a href="Style.html#Property-textUnderline">textUnderline</a>, |
| <a href="Style.html#Property-verticalAlign">verticalAlign</a>, |
| <a href="Style.html#Property-whiteSpace">whiteSpace</a>, |
| <a href="Style.html#Property-widows">widows</a>, |
| <a href="Style.html#Property-wordSpacing">wordSpacing</a> |
| </p> |
| <h3>Description</h3> |
| |
| <div class="section-text"> |
| <p>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.</p> |
| |
| <p>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.</p> |
| |
| <p>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 <code>number</code> style. If the expression |
| returns a string, then BIRT applies the <code>string</code> |
| style. And, if the expression returns a date, then BIRT applies the |
| <code>date</code> style.</p></div> |
| <h3>See Also</h3> |
| |
| <div class="section-text"> |
| <p>Label element</p> |
| <p>Multi-line Data element</p> |
| <p>Style element</p></div> |
| <h1>Property Detail</h1> |
| |
| <h2><a name="Property-action">action Property</a></h2> |
| |
| <p class="section-text">Optional hyperlink defined for the data item.</p> |
| <h3>Details</h3> |
| |
| <table class="detail-table"> |
| <tr><td>Type:</td> |
| <td><a href="../structs/Action.html">Action</a> Structure</td></tr> |
| <tr><td>Since:</td> |
| <td>1.0</td></tr> |
| <tr><td>Required:</td> |
| <td>No</td></tr> |
| <tr><td>Display Name:</td> |
| <td>Action</td></tr> |
| <tr><td>JavaScript Type:</td> |
| <td></td></tr> |
| <tr><td>Default Value:</td> |
| <td>None</td></tr> |
| <tr><td>Inherited:</td> |
| <td>Yes</td></tr> |
| <tr><td>Runtime Settable:</td> |
| <td>No</td></tr> |
| <tr><td>Property Sheet Visibility:</td> |
| <td>Hidden</td></tr> |
| <tr><td>Property Sheet Group:</td> |
| <td>Top</td></tr> |
| </table> |
| |
| <h3>Description</h3> |
| |
| <div class="section-text"> |
| <p>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.</p></div> |
| <h3>See Also</h3> |
| |
| <div class="section-text"> |
| <p>Action structure</p></div> |
| |
| <hr> |
| <h2><a name="Property-helpText">helpText Property</a></h2> |
| |
| <p class="section-text">Optional tool-tip text that appears when the user hovers the cursor over the item.</p> |
| <h3>Details</h3> |
| |
| <table class="detail-table"> |
| <tr><td>Type:</td> |
| <td><a href="../types.html#string">string</a></td></tr> |
| <tr><td>Since:</td> |
| <td>1.0</td></tr> |
| <tr><td>Required:</td> |
| <td>No</td></tr> |
| <tr><td>Display Name:</td> |
| <td>Help text</td></tr> |
| <tr><td>JavaScript Type:</td> |
| <td></td></tr> |
| <tr><td>Default Value:</td> |
| <td>None</td></tr> |
| <tr><td>Inherited:</td> |
| <td>Yes</td></tr> |
| <tr><td>Runtime Settable:</td> |
| <td>No</td></tr> |
| <tr><td>Property Sheet Visibility:</td> |
| <td>Visible</td></tr> |
| <tr><td>Property Sheet Group:</td> |
| <td>Top</td></tr> |
| </table> |
| |
| <h3>Description</h3> |
| |
| <div class="section-text"> |
| <p>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."</p> |
| |
| <p>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.</p></div> |
| |
| <hr> |
| <h2><a name="Property-helpTextID">helpTextID Property</a></h2> |
| |
| <p class="section-text"></p> |
| <h3>Details</h3> |
| |
| <table class="detail-table"> |
| <tr><td>Type:</td> |
| <td><a href="../types.html#resourceKey">resourceKey</a></td></tr> |
| <tr><td>Since:</td> |
| <td>1.0</td></tr> |
| <tr><td>Required:</td> |
| <td>No</td></tr> |
| <tr><td>Display Name:</td> |
| <td>Help text key</td></tr> |
| <tr><td>JavaScript Type:</td> |
| <td></td></tr> |
| <tr><td>Default Value:</td> |
| <td>None</td></tr> |
| <tr><td>Inherited:</td> |
| <td>Yes</td></tr> |
| <tr><td>Runtime Settable:</td> |
| <td>Yes</td></tr> |
| <tr><td>Property Sheet Visibility:</td> |
| <td>Visible</td></tr> |
| <tr><td>Property Sheet Group:</td> |
| <td>Top</td></tr> |
| </table> |
| |
| |
| <hr> |
| <h2><a name="Property-resultSetColumn">resultSetColumn Property</a></h2> |
| |
| <p class="section-text">The bound column name refers to the value to display in the item.</p> |
| <h3>Details</h3> |
| |
| <table class="detail-table"> |
| <tr><td>Type:</td> |
| <td><a href="../types.html#string">string</a></td></tr> |
| <tr><td>Since:</td> |
| <td>2.1</td></tr> |
| <tr><td>Required:</td> |
| <td>No</td></tr> |
| <tr><td>Display Name:</td> |
| <td>Result set column</td></tr> |
| <tr><td>JavaScript Type:</td> |
| <td></td></tr> |
| <tr><td>Default Value:</td> |
| <td>None</td></tr> |
| <tr><td>Inherited:</td> |
| <td>Yes</td></tr> |
| <tr><td>Runtime Settable:</td> |
| <td>Yes</td></tr> |
| <tr><td>Property Sheet Visibility:</td> |
| <td>Visible</td></tr> |
| <tr><td>Property Sheet Group:</td> |
| <td>Top</td></tr> |
| </table> |
| |
| <h3>Description</h3> |
| |
| <div class="section-text"> |
| <p>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.</p> |
| |
| <p>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 <i>ROM Scripting Specification</i> for |
| details.</p> |
| |
| <p>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.</p></div> |
| <h1>Method Detail</h1> |
| |
| <h2><a name="Method-onCreate">onCreate Method</a></h2> |
| |
| <p class="section-text">Script executed when the element is created in the Factory.</p> |
| <h3>Synopsis |
| </h3> |
| |
| <p class="section-text"><code>None obj.onCreate( )</code></p> |
| <h3>Details |
| </h3> |
| |
| <table class="detail-table"> |
| <tr><td>Since:</td> |
| <td>1.0</td></tr> |
| <tr><td>Context:</td> |
| <td>factory</td></tr> |
| <tr><td>Arguments:</td> |
| <td>None</td></tr> |
| <tr><td>Return Type:</td> |
| <td>None</td></tr> |
| </table> |
| |
| <h3>Description</h3> |
| |
| <div class="section-text"> |
| <p>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.</p></div> |
| |
| <hr> |
| <h2><a name="Method-onPageBreak">onPageBreak Method</a></h2> |
| |
| <p class="section-text"></p> |
| <h3>Synopsis |
| </h3> |
| |
| <p class="section-text"><code>None obj.onPageBreak( )</code></p> |
| <h3>Details |
| </h3> |
| |
| <table class="detail-table"> |
| <tr><td>Since:</td> |
| <td>2.1</td></tr> |
| <tr><td>Context:</td> |
| <td>presentation</td></tr> |
| <tr><td>Arguments:</td> |
| <td>None</td></tr> |
| <tr><td>Return Type:</td> |
| <td>None</td></tr> |
| </table> |
| |
| |
| <hr> |
| <h2><a name="Method-onPrepare">onPrepare Method</a></h2> |
| |
| <p class="section-text">It is for a script startup phase. No data binding yet. The design of an element can be changed here.</p> |
| <h3>Synopsis |
| </h3> |
| |
| <p class="section-text"><code>None obj.onPrepare( )</code></p> |
| <h3>Details |
| </h3> |
| |
| <table class="detail-table"> |
| <tr><td>Since:</td> |
| <td>2.0</td></tr> |
| <tr><td>Context:</td> |
| <td>startup</td></tr> |
| <tr><td>Arguments:</td> |
| <td>None</td></tr> |
| <tr><td>Return Type:</td> |
| <td>None</td></tr> |
| </table> |
| |
| <h3>Description</h3> |
| |
| <div class="section-text"> |
| <p>It is for a script startup phase. No data binding yet. The design of an element can be changed here.</p></div> |
| |
| <hr> |
| <h2><a name="Method-onRender">onRender Method</a></h2> |
| |
| <p class="section-text">Script executed when the element is prepared for rendering in the Presentation engine.</p> |
| <h3>Synopsis |
| </h3> |
| |
| <p class="section-text"><code>None obj.onRender( )</code></p> |
| <h3>Details |
| </h3> |
| |
| <table class="detail-table"> |
| <tr><td>Since:</td> |
| <td>1.0</td></tr> |
| <tr><td>Context:</td> |
| <td>presentation</td></tr> |
| <tr><td>Arguments:</td> |
| <td>None</td></tr> |
| <tr><td>Return Type:</td> |
| <td>None</td></tr> |
| </table> |
| |
| <h3>Description</h3> |
| |
| <div class="section-text"> |
| <p>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.</p></div> |
| </body> |
| </html> |