This is my message -1) I want this -2) and this -3) and this and here is an other line
Frank | |
prod: WF 7.6.10 platform Windows, databases: msSQL2000, msSQL2005, RMS, Oracle, Sybase,IE7 test: WF 7.6.10 on the same platform and databases,IE7 |
-SET &VbCrLf = HEXBYT(13, 'A1')||HEXBYT(10, 'A1');
In FOCUS since 1986 | WebFOCUS Server 8.2.01M, thru 8.2.07 on Windows Svr 2008 R2 | ||
WebFOCUS App Studio 8.2.06 standalone on Windows 10 |
Frank | |
prod: WF 7.6.10 platform Windows, databases: msSQL2000, msSQL2005, RMS, Oracle, Sybase,IE7 test: WF 7.6.10 on the same platform and databases,IE7 |
Frank | |
prod: WF 7.6.10 platform Windows, databases: msSQL2000, msSQL2005, RMS, Oracle, Sybase,IE7 test: WF 7.6.10 on the same platform and databases,IE7 |
Frank | |
prod: WF 7.6.10 platform Windows, databases: msSQL2000, msSQL2005, RMS, Oracle, Sybase,IE7 test: WF 7.6.10 on the same platform and databases,IE7 |
Elegy written in a Country Churchyard _____________________________________ The curfew tolls the knell of parting day, The lowing herd winds slowly o'er the lea, The ploughman homeward plods his weary way, And leaves the world to darkness and to me. Now fades the glimmering landscape on the sight, And all the air a solemn stillness holds, Save where the beetle wheels his droning flight, And drowsy tinklings lull the distant folds; By Thomas Gray (1716-71).
Elegy written in a Country Churchyard___________ __________________________ The curfew tolls the knell of parting day, The lowing herd winds slowly o'er the lea, The ploughman homeward plods his weary way, And leaves the world to darkness and to me.Now fades the glimmering landscape on the sight, And all the air a solemn stillness holds, Save where the beetle wheels his droning flight, And drowsy tinklings lull the distant folds;By Thomas Gray (1716-71).
Elegy written in a Country Churchyard _____________________________________ The curfew tolls the knell of parting day, The lowing herd winds slowly o'er the lea, The ploughman homeward plods his weary way, And leaves the world to darkness and to me. Now fades the glimmering landscape on the sight, And all the air a solemn stillness holds, Save where the beetle wheels his droning flight, And drowsy tinklings lull the distant folds; By Thomas Gray (1716-71).
-DEFAULTS &OUTPUT ='PDF' SET PAGE = NOPAGE DEFINE FILE fileName -* Not as bad as it looks, without comments there is only 11 lines of code. -* Get the length of the field with ARGLEN within CTRAN, and use CTRAN to change the -* Line Feed (ascii 10) to a # (ascii 35). You can use any character if you want to. -* ARGLEN is required, it stops rubbish coming through later. lf#Text/A4000V = CTRAN(ARGLEN(4000, myText,'I4'), myText, 10, 35, lf#Text); -* 2 different approaches for HTML and PDF. -IF &OUTPUT EQ PDF GOTO :PDFCHANGE; -:HTMLCHANGE -* For HTML output -* change the # (which was a line feed originally) to a <BR> to give an HTML line break br_Text/A4000V = STRREP (4000,lf#Text,1,'#',4,'<BR>',4000,br_Text); -* Get length with LENV of TRIMV of the string, within STRREP, -* and change a space to a (an HTML space) to go back to original formatting. -* This can be ignored if you only want line feeds and no spacing at the start of the line. sp_Text/A4000V = STRREP(LENV(TRIMV('T', br_Text, 4000, ' ', 1,'A4000V'),'I4'),br_Text,1,' ',6,'&|nbsp;',4000,sp_Text); -GOTO :CHANGED -:PDFCHANGE -* For PDF layout -* This can be ignored if you only want line feeds and no spacing at the start of the line. -* Hard to explain! Change the # (which was a line feed originally) to a '#%',(hash percent) lf%Text/A4000V = STRREP (4000,lf#Text,1,'#',2,'#%',4000,lf%Text); -* Then CTRAN the # (ascii 35) back to a line feed (ascii 10) -* (I know it sounds daft but persevere here) lf_Text/A4000V = CTRAN(4000, lf%Text, 35, 10, lf_Text); -* Then CTRAN the % (ascii 37) to a null (ascii 0) -* Why? Anything (except a space) after the line feed seems to kick PDF into action! -* and add a space at the beginning to get alignment back correctly, -* other lines have an extra space because of the null character after the line feed. sp_Text/A4000V = ' ' | CTRAN(4000, lf_Text, 37, 0, sp_Text); -:CHANGED END -* To be honest it is easier to have the formatted text in a subhead/subfoot/heading/footing. -* In a column it doesn't seem to columnise(?) so well, PDF particularly, with other fields. -* This example has the formatted text in a column, in a heading and in a subhead. -* If you don't want line spacing at the start of a line use br_Text (html) -* or myText (pdf) instead of sp_Text. TABLE FILE fileName HEADING "<sp_Text " " " PRINT sp_Text AS '' BY MYKEY NOPRINT SUBHEAD "<sp_Text" " " ON TABLE PCHOLD FORMAT &OUTPUT ON TABLE SET STYLE * UNITS=IN,PAGESIZE=LETTER,ORIENTATION=PORTRAIT,SIZE=8,FONT='COURIER',GRID=OFF,SQUEEZE=ON,$ -* Here is the key to it all for PDF, not really for HTML, but does no harm. -* See page 29-32 of the creating reports, 713 manual for full syntax. TYPE=REPORT,LINEBREAK='LF',WRAP=6,$ -* Plus any other styling you want. ENDSTYLE END
Frank | |
prod: WF 7.6.10 platform Windows, databases: msSQL2000, msSQL2005, RMS, Oracle, Sybase,IE7 test: WF 7.6.10 on the same platform and databases,IE7 |
FOCUS/WebFOCUS 1990 - 2011 |
Frank | |
prod: WF 7.6.10 platform Windows, databases: msSQL2000, msSQL2005, RMS, Oracle, Sybase,IE7 test: WF 7.6.10 on the same platform and databases,IE7 |