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. Moving forward, myibi is our community platform to learn, share, and collaborate. We have the same Focal Point forum categories in myibi, so you can continue to have all new conversations there. If you have any questions or need access: Contact myibi@ibi.com


Connect to myibi

Read-Only Read-Only Topic
Go
Search
Notify
Tools
Carriage Returns
 Login/Join
 
Platinum Member
posted
I am pulling an field (with all it's answers) from a database using pass-thru sql. What happens is it pulls correctly, but when I display it in my PDF report, the answer is cut off where there is a carriage return in it.

This field is a comment box. So if a user inserts a comment then a carriage return and another comment, the second comment won't appear.

Has anyone encountered this or have any idea on why this is occuring?
 
Posts: 178 | Registered: May 11, 2005Report This Post
Guru
posted Hide Post
Have you tried using the CTRAN function to remove the carriage return. I believe the decimal value of a carriage return is 13.

ASCII Look-up table
 
Posts: 406 | Location: Canada | Registered: May 31, 2004Report This Post
Platinum Member
posted Hide Post
I have never used the CTRAN function before, but I am currently doing some research on it and will try it out.

Is there an example of how to use it. I generally go to the WebFocus Help Contents, but if you have an easier way to show or explain, I would appreciate your thoughts.

Thanks so much for the reply!!
 
Posts: 178 | Registered: May 11, 2005Report This Post
Guru
posted Hide Post
field2/A20 = CTRAN(20,field1,13,32,field2);

field1 - input fieldname
field2 - output fieldname
20 - lenght of field1
13 - Carriage Return
32 - Space
 
Posts: 406 | Location: Canada | Registered: May 31, 2004Report This Post
<Ken>
posted
I run into this all the time. I handle it in SQL by replacing CR and LF with spaces

REPLACE(REPLACE(tn.vchNote,CHAR(10),' '),CHAR(13),' ') AS [Notes]
 
Report This Post
Platinum Member
posted Hide Post
Okay so Ken, I would just throw that in the actual SQL statement?

Select *
From *
Where *
Replace....
 
Posts: 178 | Registered: May 11, 2005Report This Post
Platinum Member
posted Hide Post
Okay, nevermind, i would use the REPLACE as an item in the SELECT area.

Thanks so much, I am working with it!!
 
Posts: 178 | Registered: May 11, 2005Report This Post
Platinum Member
posted Hide Post
What kind of format would that be given?

After the SQL, i have:

DEFINE FILE MYFILE
ANSWER/????? = IF VALUE EQ 808 THEN Notes;
END

How would the format work? I keep getting an error about comparing computational and alpha values.

Thank you
 
Posts: 178 | Registered: May 11, 2005Report This Post
Platinum Member
posted Hide Post
Okay, it seemed to not even need to be a part of the DEFINE and it worked perfectly.

Thanks so much everyone for your input!!
 
Posts: 178 | Registered: May 11, 2005Report This Post
  Powered by Social Strata  

Read-Only Read-Only Topic


Copyright © 1996-2020 Information Builders