QUESTION

Describe a question field

QUESTION name TYPE type PROMPT "prompt" [DESCRIPTION "description"]
[FORMAT "format"] [DEFAULT "default"] [INFO LINE "info_line"] [JUST just]
[REQUIRED]

name

The name of the temporary question field to be created. It can have up to 15 characters but cannot contain spaces.

TYPE type

The data type of the question field. See the Discussion for valid values and required syntax.

PROMPT “prompt”

The text for the question field prompt.

DESCRIPTION “description”

(optional) A description of the question field. It can have up to 40 characters.

FORMAT “format”

(optional) The display format for the question field. It can have up to 40 characters.

DEFAULT “default”

(optional) The default answer to the question field. It can have up to 80 characters.

INFO LINE “info_line”

(optional) The text that appears on the information line when this question field is displayed. It can have up to 80 characters.

JUST just

(optional) The justification of the question field. Valid values for just are:

LEFT (default for alpha, time, and user type fields)

CENTER (not valid for numeric, date, and time fields)

RIGHT (default for decimal, implied-decimal, and date fields; not valid for alpha and user fields)

REQUIRED

(optional) Specifies that a nonblank alpha or nonzero numeric entry is required in the field.

The QUESTION statement describes a temporary question field to be created in a report. Question fields store answers that the user enters when the report is run. They are temporary fields that are not found in the repository. The maximum number of question fields that can be defined in a report is 99.

If a temporary question field does not have a unique name, it must be preceded by “TEMP.” For example, if a temporary field is called STATE and one of the selected files also contains a field called STATE, you would specify the temporary field like this:

TEMP.STATE

The type argument indicates the data type of the question field: alphanumeric, numeric, date, user, or time. See below for the valid syntax for each data type.

Alphanumeric

ALPHANUMERIC SIZE size [UPPERCASE]

SIZE size

The length of the question field.

UPPERCASE

Converts lowercase input characters to uppercase.

Numeric

NUMERIC SIZE size [PRECISION dec_places] [NODECIMAL] [NEGATIVE] [BLANKIFZERO]

SIZE size

The length of the question field.

PRECISION dec_places

(optional) The number of characters to the right of the decimal point in an implied-decimal question field. This attribute is required for a data type of implied-decimal. The value must be less than or equal to the size of the field. Otherwise, the field is ignored.

NODECIMAL

(optional) Indicates that the user does not need to type a decimal point when placing input in a decimal or implied-decimal question field.

NEGATIVE

(optional) Allows negative values in decimal and implied-decimal question fields.

BLANKIFZERO

(optional) Indicates that a decimal or implied-decimal question field will be left blank if the user enters a value of 0.

Date

DATE STORED store_format [DATE TODAY]

STORED store_format

Specifies the storage format for a date question field. Valid values are:

YYPP

YYJJJ

YYMMDD (default)

YYYYPP

YYYYJJJ

YYYYMMDD

DATE TODAY

(optional) Defaults the date to today’s date if the user presses Enter without entering anything in a blank question field.

User

USER SIZE size USERTYPE "user_type_id" [USERTEXT "user_text"] [UPPERCASE]

SIZE size

The length of the question field.

USERTYPE “user_type_id”

The ID of the user-defined data type. It can have up to 30 characters.

USERTEXT “user_text”

(optional) A user-defined text string associated with the question field. It can have up to 80 characters.

UPPERCASE

(optional) Converts lowercase input characters to uppercase.

Time

TIME

(The time data type has no arguments.)

QUESTION CITY TYPE ALPHANUMERIC SIZE 30 PROMPT "City:"
DEFAULT "*" INFO LINE "Enter name of city."
QUESTION CUST_ID TYPE NUMERIC SIZE 4 PROMPT "Customer ID:"
INFO LINE "Enter customer identification number." REQUIRED
QUESTION BEG_DATE TYPE DATE STORED YYMMDD 
PROMPT "Beginning date:" FORMAT "MM/DD/YYYY"
INFO LINE "Enter the beginning date to read from." REQUIRED
QUESTION BEG_DATE TYPE USER SIZE 8 USERTYPE "U_DATE1" 
USERTEXT "MM-DD-YYYY"
INFO LINE "Enter the beginning date to read from." REQUIRED