DarkLordz
16th September 2016, 04:42
i have string1, string2, and string 3
and i want convert that string to one text with domain text
how make it possible ?
thanks
mark_h
19th September 2016, 14:52
Search on the text.to.buf() functions. You can convert the 3 strings into text. Or if you wanted to you could write them to a file and read them back in using some other text functions, but I think text.to.buf options would work the best and probably be easiest.
sachinbaan
19th September 2016, 16:43
Hello,
text.write() is also an option, where you have to write your string in a temporary file and pass the path of the temporary file as last argument of text.write()...
DarkLordz
21st September 2016, 05:56
Search on the text.to.buf() functions. You can convert the 3 strings into text. Or if you wanted to you could write them to a file and read them back in using some other text functions, but I think text.to.buf options would work the best and probably be easiest.
thank for reponse..
can u give example how to convert string to text with text.to.buf. because i found text to buf use for convert text to string.
thank for u'r help
DarkLordz
21st September 2016, 05:59
Hello,
text.write() is also an option, where you have to write your string in a temporary file and pass the path of the temporary file as last argument of text.write()...
talx = btext
|file.tmp = creat.tmp.file$( bse.tmp.dir$() )
file.tmp = creat.tmp.file$() |create temp file
ft = seq.open(file.tmp,"w") |open file with write method
ret = seq.puts(talx,ft) |text is your input text
seq.close(ft)
ret = text.write("memo",language$,"","","","","text","",file.tmp)
memo is my variable with domain text.
but memo not display anything in layout.
anything wrong with my code ?
mark_h
23rd September 2016, 00:07
Never tried it with a field declared as text, I usually using a table field. Make sure text is being written to the temp file. What is in ret from the text.write? If it is 0 then nothing is probably happening. You might also want to check the domain on the report for the field.
andreas.toepper
23rd September 2016, 10:28
memo is my variable with domain text.
but memo not display anything in layout.
anything wrong with my code ?
I've had that myself a short time ago. I think text.write() does create the text, but does not store the created text in the database. In LN there is function textfield.to.database() which writes the textdata into the database.
I've added textfield.to.datbase in when.field.changes (in LN it is possible to create an edit field on the mask where you can enter or modify a tctxtn type tablefield or variable). I've never checked, whether the function textfield.to.database() is available in BaanIV or not.