Consultor Eletrônico



Kbase P176871: Errors when attempting to display INTEGER field with FORMAT "HH:MM" in frame field
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   11/5/2010
Status: Unverified

SYMPTOM(s):

Errors when attempting to display INTEGER field with FORMAT "HH:MM" in frame field

Errors when attempting to define a frame with STRING(<time-field>,"HH:MM")

** Numeric format <format> provides for no digits. (148)

** Item must be field, constant, SPACE phrase, or SKIP phrase. (407)

DEFINE FRAME <frame-name>
<int-field> FORMAT "HH:MM"

DEFINE FRAME <frame-name>
STRING(<int-field>,"HH:MM")

FACT(s) (Environment):

All Supported Operating Systems
Progress 7.x
Progress 8.x
Progress 9.x
OpenEdge 10.x

CAUSE:

This is expected behavior. The only way to convert an INTEGER field to a TIME format in the ABL is to use the STRING function with a time format string, and this requires further conversion in order to convert the value to a string. When a FRAME is built by the compiler the format of fields is built statically into it and this conversion takes place at runtime, which is too late for the compiler to resolve.

FIX:

Use the @ option with the DISPLAY statement at runtime to overlay the value of the integer field in the frame, or use a local variable to convert the value and include it in the frame definition.