-SET &TEXTFIELD = TRIMV('B', STRREP(1000,&TEXTFIELD.QUOTEDSTRING,2,HEXBYT(013, 'A1')|HEXBYT(010, 'A1'),4,'<BR>',1000,'A1000V'), 1000, ' ', 1, 'A1000V');
In Focus since 1979///7706m/5 ;wintel 2008/64;OAM security; Oracle db, ///MRE/BID |
DEFINE FILE CAR CRLF/A2= HEXBYT(13,'A1') | HEXBYT(10,'A1'); COUNTRY_NEWLINE_CAR/A100= COUNTRY |CRLF| CAR ; END TABLE FILE CAR PRINT COUNTRY_NEWLINE_CAR ON TABLE PCHOLD FORMAT PDF END
quote:
Example: Displaying an Alphanumeric Field With Line Breaks in a PDF Report
The following request defines an alphanumeric named ANLB field with a semicolon (in an EDCDIC environment) or a circumflex (in an ASCII environment) in the middle. The CTRAN function then replaces the semicolon or circumflex with a carriage return character and stores this string in a field named ANLBC. On the report output, this field displays on two lines:
DEFINE FILE EMPLOYEE
ANLB/A40 ='THIS IS AN An FIELD;WITH A LINE BREAK.';
ANLBC/A40 = CTRAN(40, ANLB, 094, 013 , ANLBC);
END
TABLE FILE EMPLOYEE
PRINT LAST_NAME ANLBC
WHERE LAST_NAME EQ 'BLACKWOOD'
ON TABLE HOLD FORMAT PDF
ON TABLE SET STYLE *
TYPE=REPORT,LINEBREAK='CR',$
ENDSTYLE
END
quote:
Using StyleSheet attributes, you can display An (character) and AnV (varchar) fields that contain line breaks on multiple lines in a PDF or PostScript report. Line breaks can be based on line-feeds, carriage-returns, or a combination of both. If you do not add these StyleSheet attributes, all line-feed and carriage-return formatting within these fields will be ignored, and all characters will be displayed on one line that wraps to fit the width of the report.
--------------------------------------------------------------------------------
Top of page
--------------------------------------------------------------------------------
xx
Syntax: How to Display An and AnV Fields Containing Line Breaks on Multiple Lines
TYPE=REPORT,LINEBREAK='type',$
where:
REPORT
Is the type of report component. TYPE must be REPORT. Otherwise an error will result.
'type'
Specifies that line breaks will be inserted in a report based on the following:
LF inserts a line break after each line-feed character found in all An and AnV fields.
CR inserts a line break after each carriage-return character found in all An and AnV fields.
LFCR inserts a line break after each combination of a line-feed character followed by a carriage-return character found in all An and AnV fields.
CRLF inserts a line break after each combination of a carriage-return character followed by a line-feed character found in all An and AnV fields.
Note: The report output must be formatted as PDF or PostScript.
function parseText(){ // alert("test"); var _txt = document.getElementById("textarea1").value; document.getElementById("textarea1").value = _txt.replace(/(?:\r\n|\r|\n)/g,"<br>"); }
In Focus since 1979///7706m/5 ;wintel 2008/64;OAM security; Oracle db, ///MRE/BID |