Consultor Eletrônico



Kbase P83503: Length of value in a calculated field is truncated
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   1/13/2009
Status: Verified

SYMPTOM(s):

Length of value in a calculated field is truncated

Value in calculated field is truncated to 8 characters when determined by an IF statement:
IF (x = y) THEN ("123456789012345") ELSE ("abcdefghijklmno")

Value in second calculated field with no IF statement is not truncated

FACT(s) (Environment):

Progress 8.1x
Progress 9.x
All Supported Operating Systems

CHANGE:

Upgraded from Progress 8.1x to Progress 9

CAUSE:

When used as part of the IF statement, the value is evaluated as a variable and therefore formatting rules are applied. The default FORMAT of a string variable is "x(8)", hence the truncation.

FIX:

Apply a FORMAT statement to the calculated field:

DEFINE BROWSE b1
QUERY q1 NO-LOCK
DISPLAY
IF (1 = 1) THEN ("123456789012345") ELSE ("abcdefghijklmno") COLUMN-LABEL "Field 1" WIDTH 20 FORMAT "x(20)"
"123456789012345" COLUMN-LABEL "Field 2"
WITH NO-ROW-MARKERS SEPARATORS SIZE 50 BY 5 EXPANDABLE.