Displaying Text : Using a text element : Combining a value from a data set field and static text
 
Combining a value from a data set field and static text
The following example shows how to use the VALUE-OF tag to insert dynamic values that data set fields return.
Text that you supply:
Dear <VALUE-OF>row["contact_firstname"]</VALUE-OF>,
<p>
Thank you for your recent order. Order <VALUE-OF>
row["orderID"]</VALUE-OF> will be shipped by <VALUE-OF>
row["shipByDate"]</VALUE-OF>.
Output:
Dear Bob,
Thank you for your recent order. Order 1115 will be shipped
by Apr 17, 2009 12:00AM.
You can display field values in a text element only if the following requirements are met:
*The text element has access to the data set that contains the fields.
*If you place the text element directly on the page, you must bind the text element to the data set that contains the field value. To do so, select the text element, choose the Binding tab in the property editor, then select the data set to which to bind. Placing the text element directly on the page, however, displays only one value.
*If you place the text element in the detail row of a table or a list to display all values of a data set field, bind the table or list to the data set.
*A column binding is created for each data set field. The column binding refers to the data set field. The VALUE-OF tag refers to the column binding.