Writing Expressions : Manipulating string data
 
Manipulating string data
Often, a data source contains string or text data that is not in the right form for a report. For example, you want to sort a report by last name, but the data source contains last names only as part of a full name field. Or, conversely, you want to display full names, but the data source stores first names and last names in separate fields.
Both JavaScript and BIRT provide a wide range of functions for manipulating strings. In the expression builder, look under Native JavaScript Functions—String, and under BIRT Functions—BirtStr. The following sections describe some of the common string-manipulation tasks and provide examples of expressions.