Problem with display using view-as editor

melmckee72

New Member
I'm working on a report that includes a field that I want to wrap at 30 chars wide.

I've set up the variable as an editor.

If I use size 30 by 2 it works perfectly except that on those lines when there is only 1 line of text filled, it inserts a blank line.

If I set it to 30 by 1 all the data on the records with single line of display work great, but once I get to a record that needs to show more than one line in the editor field, I lose the display of all the data after that field.

Code looks like this:
def var mselect as char view-as editor size 30 by 1.
if mrep = 4 and ftyp <> "Q" then display
MTC
mrte
mdrpdte
mselect
mqtym[1]
mcpm
Mords[1]
MCYS[1]
MSAMT[1]
MPAMT[1]
mtn2[7]
mopn[1]
mtn2[1]
mtn2[2]
mdec[14]
mtn2[4]
mtn
mpd[2]
mpd[1]
MTN2[5] column-label "Cost!Ord"
mpdm column-label "Paid!/m"
no-labels
with fram lhist DOWN width 230.

Display looks like this:
BS/425 KRC2A03/ 01/15/02 RFM 7.9 2905 343
BS/429 KRC2A04/ 01/15/02 RFM 4.0 1751 393
Clement/1
NC/1055 KRC2A03/ 01/15/02 0-6 mos Health & Sfty
buyers/subs
NC/1083 KRC2A04/ 01/15/02 0-6 mos Health & Sfty
buyers/subs
Envirowin/1
B7/356 KRC2A03/ 01/15/02 Paids 3.3 1534 453
B7/401 KRC2A04/ 01/15/02 Paids 1.7 855 503

Any help would be appreciated.

Thanks
 
I think you are gonna have to do it manually:

<pre>
def var mselect as char view-as editor size 30 by 1.
if mrep = 4 and ftyp <> "Q" then display
MTC
mrte
mdrpdte
substring(mselect,1,30) @ mselect
mqtym[1]
mcpm
Mords[1]
MCYS[1]
MSAMT[1]
MPAMT[1]
mtn2[7]
mopn[1]
mtn2[1]
mtn2[2]
mdec[14]
mtn2[4]
mtn
mpd[2]
mpd[1]
MTN2[5] column-label "Cost!Ord"
mpdm column-label "Paid!/m"
no-labels
with fram lhist DOWN width 230.
if length(mselect) > 30 then display
"" @ MTC
"" @ mrte
"" @ mdrpdte
substring(mselect,31,30) @ mselect
"" @ mqtym[1]
"" @ mcpm
"" @ Mords[1]
"" @ MCYS[1]
"" @ MSAMT[1]
"" @ MPAMT[1]
"" @ mtn2[7]
"" @ mopn[1]
"" @ mtn2[1]
"" @ mtn2[2]
"" @ mdec[14]
"" @ mtn2[4]
"" @ mtn
"" @ mpd[2]
"" @ mpd[1]
"" @ MTN2[5] column-label "Cost!Ord"
"" @ mpdm column-label "Paid!/m"
no-labels
with fram lhist DOWN width 230.

</pre>
 
Back
Top