Data types are types of values—numbers, strings, and Booleans, for example—that you can manipulate in any programming language. Every element of report data has a certain data type, and every expression that you create returns a value of a particular data type.
This concept is important because, if the expression you type does not handle data types properly, you do not obtain the expected results. For example, you cannot perform mathematical calculations on numbers if they are of string type, and you cannot convert values in a date field to uppercase characters.
If you type an expression to manipulate a data field, make sure you verify its type, particularly if the data consists of numbers. Numbers can be of string type or numeric type. For example, databases typically store postal codes and telephone numbers as strings. Item quantities or prices are always of numeric type so that you can manipulate the data mathematically. IDs such as customer IDs or order IDs are usually of numeric type so that the application can store them in numeric order, such as 1, 2, 3, 10, 11, rather than in alphanumeric order, such as 1, 10, 11, 2, 3.
To view the data type of a column, select the column and choose Format➛Format Data from the context menu. The name of the dialog box that appears tells you the type of data in the column. For example, if you select the credit limit column, the dialog box that appears is called Number column format.
When working with multiple columns containing the same data type, you can use Interactive Viewer to specify a format for the data in one column, and copy the format to other columns. This section also explains how to copy other formatting properties.