DataWindow painter expressions

Adding a DataWindow painter expression using the Add Child>DataWindow Control Reference menu item opens the Modify Expression dialog box. This enables you to create references to columns from the data source of the DataWindow object. It also enables the calling of global functions. One use of this feature is to return a fragment of XHTML to embed, providing another level of dynamic XHTML generation.

Using Date and DateTime with strings

If you use a control reference or a DataWindow painter expression that does not include a string to represent Date and DateTime columns in a template, the XHTML output conforms to ISO 8601 date and time formats. For example, consider a date that displays as 12/27/2004 in the DataWindow, using the display format mm/dd/yyyy. If the export template does not use an expression that includes a string, the date is exported to XHTML as 2004-12-27.

However, if the export template uses an expression that combines a column with a Date or DateTime datatype with a string, the entire expression is exported as a string and the regional settings in the Windows registry are used to format the date and time.

Using the previous example, if the short date format in the registry is mm/dd/yy, and the DataWindow painter expression is: "Start Date is " + start_date, the XHTML output is Start Date is 12/27/04.