Baanboard.com

Go Back   Baanboard.com > Forum > Baan Quick Support: Functional & Technical > Tools Development

User login

Frontpage Sponsor

Main

Google search


Poll
For ERP LN feature pack upgrade, what method of install are you using?
Installation Wizard into existing VRC
38%
Installation Wizard into new VRC
38%
Manual into existing VRC
5%
Manual into new VRC
19%
Total votes: 42

Baanboard at LinkedIn


Reference Content

Reply
 
Thread Tools Display Modes
  #1  
Old 5th March 2007, 09:01
ciptadi ciptadi is offline
Junior Member
 
Join Date: May 2006
Location: City: Cakung District : East Jakarta Country : Indonesia
Posts: 16
ciptadi is on a distinguished road
Baan: BaaN V - DB: ORACLE 9.i - OS: WIN 2000 SERVER
Question Convert Multi Lines Text into single line String
Baan: Other/Unknown
C/S: None/Unknown

Dear all,
I have problem to convert text from table(tttxt010). The problem occcur when I want to convert text with multi lines into single line string. For example:
I have a text in table tttxt010 as follows:
Purchase of Drinking water
For March 2007
DOC: WHC009929

How can I convert this text into single line string. I have tried, but the result is It still converted as 3 lines of string.
Actually after I convert this, I will open it via MS Excell, so I hope it can be one row only, not become 3 row.

Any Idea?
Thank you very much.

Ciptadi Nugroho.
Reply With Quote
  #2  
Old 5th March 2007, 09:26
bdittmar's Avatar
bdittmar bdittmar is offline
Guru
 
Join Date: Apr 2002
Location: Germany, 50.584097,8.544078
Posts: 1,693
bdittmar will become famous soon enough
Baan: 2.2/3.1/4c4/LN6.1 FP6/FP9/HiDox - DB: tbase, ms-sql7, oracle10gV1, 11g - OS: HP-UX, W2K3, SLES
text.to.buf

Quote:
Originally Posted by ciptadi View Post
Dear all,
I have problem to convert text from table(tttxt010). The problem occcur when I want to convert text with multi lines into single line string. For example:
I have a text in table tttxt010 as follows:
Purchase of Drinking water
For March 2007
DOC: WHC009929

How can I convert this text into single line string. I have tried, but the result is It still converted as 3 lines of string.
Actually after I convert this, I will open it via MS Excell, so I hope it can be one row only, not become 3 row.

Any Idea?
Thank you very much.

Ciptadi Nugroho.
define string item.text.file(500)
#include <bic_text>

Hello,
try the function text.to.buf

function read.itemtext()
{

item.text.file = ""

string itext(200)
string ibuf(80,40)
long i

itext = ""

for i = 1 to
text.to.buf("tiitm001.txta", "language", 1, ibuf)
itext = strip$(itext)&" "&shiftl$(shiftr$((ibuf(1,i)))
endfor

item.text.file = itext
}

The resulting string contains " Purchase of Drinking water For March 2007 DOC: WHC009929" !

Maybe the shiftl$ > shiftr$ on textbuffer variable will do the work ?

Regards
__________________
//Bernd

Last edited by bdittmar : 5th March 2007 at 11:49. Reason: TYPO
Reply With Quote
Sponsored Links
  #3  
Old 5th March 2007, 11:31
ciptadi ciptadi is offline
Junior Member
 
Join Date: May 2006
Location: City: Cakung District : East Jakarta Country : Indonesia
Posts: 16
ciptadi is on a distinguished road
Baan: BaaN V - DB: ORACLE 9.i - OS: WIN 2000 SERVER
Question Thank you very much, you solve my problem, but how to discard the tabs in a string?

Dear bdittmar,

Thank you very much for your advice, this solve my problem.

Next question is how to discard the string that comes from "tab". We can discard any space by using strip$, shiftc$(), shiftl$(), shiftr$(),etc.
How about to discard tab in a string.

My last example
"Purchase of Drinking water__________"
"For March 2007_____"
"DOC: WHC009929"

it become:

"Purchase of Drinking water__________For March 2007_____DOC: WHC009929"

It's because sometimes our uses without awareness, press tab to their keyboard before they type new line in their text.

More Idea?

Thank you very much for any suggestion.
Ciptadi.

Note: Mark "_" representates the tab

Last edited by ciptadi : 5th March 2007 at 11:42.
Reply With Quote
  #4  
Old 5th March 2007, 12:06
george7a's Avatar
george7a george7a is offline
Guru
 
Join Date: May 2004
Location: Nazareth
Posts: 1,491
george7a is on a distinguished road
Baan: IVc, 5.0 b, 5.0 c, LN 6.1 - DB: MS SQL, Oracle - OS: Windows 2000, 2003 & UNIX
Hi,

I have done once a function that removes the "tab" from a string. You will have to go through all the chars in the string and check if it equals to "chr$(9)" (It is the ASCII code of the tab) if yes delete it.

If you have problems I can look for the function and post it here...

I hope it helps,

- George
__________________
_
George Abdo
NAZDAQ - Your Documents, Your Way.
Reply With Quote
  #5  
Old 13th March 2007, 02:49
ciptadi ciptadi is offline
Junior Member
 
Join Date: May 2006
Location: City: Cakung District : East Jakarta Country : Indonesia
Posts: 16
ciptadi is on a distinguished road
Baan: BaaN V - DB: ORACLE 9.i - OS: WIN 2000 SERVER
Smile Yes, You're right. Thank You very much

Dear All.

George, your advice is works well. Thank's.

Ciptadi.
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Programming Question mr_suleyman Tools Development 37 11th November 2016 08:14
Report with output with more than 255 char. Jaap Roos Tools Development 5 9th February 2007 21:37
File Browser Bogdan Tools Development 52 7th January 2004 08:17


All times are GMT +2. The time now is 22:31.


©2001-2017 - Baanboard.com - Baanforums.com