Converting a currency type with a computed column
You can convert a particular currency field to the type that the users enters. The Open Data Access (ODA) framework in BIRT converts the Currency field in to the following fields:
- <Field Name>.OBJECT
- <Field Name>.VALUE
- <Field Name>.TYPE
OBJECT is of type String and has currency value and a currency type.
To convert a currency field to the user entered currency type
- On the Layout tab of the layout editor for the report, click the Data Explorer tab, and double-click a data set under the Data Sets node.
- In the Edit Data Set dialog box, click Computed Columns.
- Click New.
- In the Column Name field, type a name for the computed column.
- In the Data Type field, select Decimal.
In the Expression field, type the expression, for example:
if (row["Associated Cost.OBJECT"].toFunctionalValue(params["CurrencyType"].value)- Click OK, and click Preview Results.
Tip: For faster searching, add an asterisk to the end of your partial query. Example: cert*