Computed Items in the Query Section

In the Query section, a computed item is a set of instructions to the database server. Interactive Reporting uses the computing power of the database server to perform calculations as it retrieves data from the database.

For this reason, the Query section allows you to use computed items in a way that is not possible in the other sections. Instead of creating a new data item, the new values simply replace the original values in the data item as they are retrieved from the database.

Additionally, you can compute items using any topic item in the data model and any scalar functions provided by your RDBMS.

Adjusting Data Types

Since computed items are new data items, you may want to confirm or change the new item’s data type to preserve the precision of a mixed-data type computations, or to change the way a data item is handled (for example, interpreting number as strings). This ensures the correct handling of data in server computations.

Attention to data types is most important when computing items in the Query section. Here the computation is performed on the database server, and the computed item may be handled with an unanticipated data type.

Local calculations (Results, Pivot) are handled internally, and adjustment between 16- and 32-bit integers, for example, can be handled safely using the automatic or number data type specification. For a list of supported data types, see below:

Table 119. Data Types and Specifications 

Data type

Specification

Automatic

A data type is determined automatically given the data type of the reference items and the computations performed.

Byte

Variable data type of length determined by a single byte of computer storage. Bytes can store numeric values from 0 to 255, or a single text character.

Date

Calendar date in server default format (typically mm/dd/yy).

Integer (16-bit)

Retains a 16-bit value (2 bytes). A 16-bit integer stores integer values from 0 to 16,777,216, and signed integers between +8,388,608 and –8,388,608.

Integer (32-bit)

Retains a 32-bit value (4 bytes). A 32-bit integer has a range of 0 to 4,294,967,296 if unsigned. If signed, -2,147,483,648 to 2,147,483,647.

Packed Real

Real numbers packed for use with EDA middleware. The results in Interactive Reporting are the same as real numbers.

Real

Decimal numbers up to 5 positions right of the decimal.

String

Text strings to a maximum length of 256 characters.

Time

Time in format set by user preference.

TimeStamp

Date/time combination in format set by user preference.