Language:


Field and Variable Types

Each field has its own Type, signifying the nature of the information that it contains. For example, the Type of the Customer Name field is string, allowing it to contain both alpha and numeric characters. An Invoice Total field is a decimal field, so it can only contain numbers with decimals.

Each variable has its own Type as well. When you create a variable, it will often be given a Type automatically. But in one case (when you create a variable using the [Variable] button), you will have to give it a Type yourself. For example, in a list of Invoices you might create a variable to calculate and display the total outstanding value of all the Invoices in the report. This must be a decimal variable, because it will contain numbers with decimals and because it will take its information from the Total field in each Invoice, which is a decimal field. A variable counting the number of Invoices in the list will be an integer variable, because it will only ever contain whole numbers. In a Customer List report, a variable in the specification window that allows the user to search for Customers belonging to a particular Category must be a string variable because the Category field in the Customer record is a string field. The variable containing a search criterion must have the same Type as the field being searched.

The various Types are:

Boolean
Can only have two values, 1 and 0 (zero). Boolean fields and variables are usually shown as check boxes on screen

Date
Dates

Decimal
Numbers with decimals

Integer
Whole numbers

Long
Whole numbers greater than 32,000

Record
Entire records

Row
Single rows within a record (e.g. an Invoice row)

String
Any combination of alpha and numeric characters

Time
Times