Focal Point Banner


As of December 1, 2020, Focal Point is retired and repurposed as a reference repository. We value the wealth of knowledge that's been shared here over the years. You'll continue to have access to this treasure trove of knowledge, for search purposes only.

Join the TIBCO Community
TIBCO Community is a collaborative space for users to share knowledge and support one another in making the best use of TIBCO products and services. There are several TIBCO WebFOCUS resources in the community.

  • From the Home page, select Predict: WebFOCUS to view articles, questions, and trending articles.
  • Select Products from the top navigation bar, scroll, and then select the TIBCO WebFOCUS product page to view product overview, articles, and discussions.
  • Request access to the private WebFOCUS User Group (login required) to network with fellow members.

Former myibi community members should have received an email on 8/3/22 to activate their user accounts to join the community. Check your Spam folder for the email. Please get in touch with us at community@tibco.com for further assistance. Reference the community FAQ to learn more about the community.



Read-Only Read-Only Topic
Go
Search
Notify
Tools
Carriage Returns
 Login/Join
 
Platinum Member
posted
This function works fine except that it returns an extra line feed between the first and second line every time. I am on version 7.6.4. Does anyone know why it is doing this and how to fix it?

DEFINE FILE EMPLOYEE
ANLB/A40 ='THIS IS AN EXAMPLE;OF TEXT;WITH A LINE BREAK;THAT ALWAYS RETURNS;AN EXTRA LINE BREAK.';
ANLBC/A40 = CTRAN(40, ANLB, 059, 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

That function works great except it returns this:

THIS IS AN EXAMPLE

OF TEXT
WITH A LINE BREAK
THAT ALWAYS RETURNS
AN EXTRA LINE BREAK.
 
Posts: 118 | Location: Wisconsin | Registered: January 16, 2008Report This Post
Guru
posted Hide Post
I had to change the length of ANLB and ANLBC to 86 from 40 (the string is longer than 40) to get it to run. But when I did that I got a different result than yours (mine is still wrong).

THIS IS AN EXAMPLE
OF TEXT W
ITH A LINE BREAK T
HAT ALWAYS RETURNS A
N EXTRA LINE BREAK.


(Prod: WebFOCUS 7.7.03: Win 2008 & AIX hub/Servlet Mode; sub: AS/400 JDE; mostly Self Serve; DBs: Oracle, JDE, SQLServer; various output formats)
 
Posts: 391 | Location: California | Registered: April 14, 2003Report This Post
Virtuoso
posted Hide Post
if you put a space after each ; delimiter, it displays correctly. Not sure why-- possibly in the way that it is determing what constitutes the carriage return.

(I'm on version 7.1.6. someone will have to check on 764)


Regards,

Darin



In FOCUS since 1991
WF Server: 7.7.04 on Linux and Z/OS, ReportCaster, Self-Service, MRE, Java, Flex
Data: DB2/UDB, Adabas, SQL Server Output: HTML,PDF,EXL2K/07, PS, AHTML, Flex
WF Client: 77 on Linux w/Tomcat
 
Posts: 2298 | Location: Salt Lake City, Utah | Registered: February 02, 2007Report This Post
Expert
posted Hide Post
With the changes mentioned by Nicola, and the HOLD changed to PCHOLD, I get the correct output on 7.6.2.

Code used -

DEFINE FILE EMPLOYEE 
ANLB/A86 ='THIS IS AN EXAMPLE;OF TEXT;WITH A LINE BREAK;THAT ALWAYS RETURNS;AN EXTRA LINE BREAK.'; 
ANLBC/A86 = CTRAN(86, ANLB, 059, 013, ANLBC); 
END 
TABLE FILE EMPLOYEE 
PRINT LAST_NAME ANLBC 
WHERE LAST_NAME EQ 'BLACKWOOD' 
ON TABLE PCHOLD FORMAT PDF 
ON TABLE SET STYLE * 
TYPE=REPORT,LINEBREAK='CR',$ 
ENDSTYLE 
END

Returned text was -

THIS IS AN EXAMPLE
OF TEXT
WITH A LINE BREAK
THAT ALWAYS RETURNS
AN EXTRA LINE BREAK.

T



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 
 
Posts: 5694 | Location: United Kingdom | Registered: April 08, 2004Report This Post
Virtuoso
posted Hide Post
In 7.6.4 I get the expected result, correct line breaking, with HOLD and PCHOLD.

I know that in 7.1.3 there was a need to use a null or a blank after the break for it to work properly, which I documented here somewhere.

If you want to retain text indentation at the start of a new line (text entered via a multi edit for example), there is an extra step needed, but it can be done.


Alan.
WF 7.705/8.007
 
Posts: 1451 | Location: Portugal | Registered: February 07, 2007Report This Post
Platinum Member
posted Hide Post
When I add an extra space around the ; it still puts in an extra carriage return and it is only after the first line. Makes no sense to me why it would only do it for the first line. It is no different than the rest. I am passing the data in via SQL stored procedure so I can add a non carriage return character, if there is one.

I'm using CTRAN function so I am not sure how I would handle that though.
 
Posts: 118 | Location: Wisconsin | Registered: January 16, 2008Report This Post
Virtuoso
posted Hide Post
Laurie

Can you try outputting to a SAVE file and then opening that with your text editor, also check it in hex to check the carriage return.

I am on the same release/OS as you and I get your example (changing the A40 to A86) to work fine.


Alan.
WF 7.705/8.007
 
Posts: 1451 | Location: Portugal | Registered: February 07, 2007Report This Post
  Powered by Social Strata  

Read-Only Read-Only Topic


Copyright © 1996-2020 Information Builders