Kbase P183316: OUTPUT fails to display fields after a BY 1 EDITOR widget
Autor |
  Progress Software Corporation - Progress |
Acesso |
  Público |
Publicação |
  01/03/2011 |
|
Status: Unverified
SYMPTOM(s):
OUTPUT fails to display fields after a BY 1 EDITOR widget
When OUTPUT TO file is used to display EDITOR widget field with SIZE nnn BY 1, the data of the fields after the EDITOR widget is not displayed when the EDITOR data is more than its WIDTH-CHAR (nnn).
The following code demonstrates the issue:
DEFINE VARIABLE iCounter AS INTEGER NO-UNDO.
DEFINE VARIABLE cTest AS CHARACTER VIEW-AS EDITOR SIZE 15 BY 1 NO-UNDO.
DEFINE FRAME fTest
"FirstFld"
"SecondFld"
cTest
"FourthFld"
WITH DOWN NO-LABEL.
OUTPUT TO Test.txt.
REPEAT iCounter = 1 TO 10:
ASSIGN
cTest = cTest + "text" + ",".
DISPLAY cTest WITH FRAME fTest.
END.
OUTPUT CLOSE.
Output from running the above procedure. Notice that the data after the EDITOR is not displayed when the its length exceeds the EDITOR WIDTH-CHAR of 15:
FirstFld SecondFld text, FourthFld
FirstFld SecondFld text,text, FourthFld
FirstFld SecondFld text,text,text, FourthFld
FirstFld SecondFld text,text,text,
text,
FACT(s) (Environment):
All Supported Operating Systems
OpenEdge 10.x
CAUSE:
Bug# OE00205254
FIX:
None at this time. As a workaround is to make the EDITOR a BY 2 instead of a BY 1. Note that defining the EDITOR as BY 2 will cause a blank line to be output for the field when the data fits on one line. Another workaround is to manually separate the EDITOR data into individual lines not exceeding its WIDTH-CHAR. One solution is to place the data into a TEMP-TABLE before sending output to a file as per code attached in the notes below. Please note that the solution below does not do word wrapping and may end up breaking some words in the middle.