Previous Next

Class Formatter

The Formatter class is a BIRT-provided JavaScript class that provides one static function to retrieve a formatted string from an object using any of the set String Format pattern values. These values are identical to the XML pattern markup for data type format values defined in Properties.

Formatter.format

This function returns a formatted string derived from the input object

Syntax

string format(object value, string pattern)

Parameters

value

Object. The data to format into a patterned string.

pattern

String. The validvalues include:

*
*
*
*

Returns

String. The formatted string.

Example

The following example returns the uppercase values for the customer’s last name:

Formatter.format(dataSetRow["CONTACTLASTNAME"], '>')

 

 


(c) Copyright Actuate Corporation 2012