dansimmo
17th October 2002, 02:27
I am wanting to print text lines with other fields or text to the right. Something like this ...

text line 1 some stuff
text line 2 some other stuff
text line 3 and so on ...

But I can't work out how. Is there a way to print just one of the lines of text (say the third line)?

or is there a better way altogether?

evertsen
17th October 2002, 06:57
I would define each text to its own layout in the report.

dansimmo
17th October 2002, 07:04
It's the same text. In this case it is tipcs021.txta which has about eight lines for this product. Next to each of the eight text lines on the report we want to print a different labels to the right.

I thought you may be able to put eight fields on the layout and specify each to print a line, but don't know how

evertsen
17th October 2002, 07:16
I get it now but unfortunately can't think of a way to help.

Juergen
17th October 2002, 09:17
Hi dansimmo,

i think with help of the function text.to.buf() you can realize what you want.
This stores the text of a specified text field in a two-dimensional string array.
For more details how to use this function please refer to the Baanboard Library
http://www.baanboard.com/baanboard/bblibrary.php?s=&action=show_library

Juergen

glenny04
17th October 2002, 12:56
dannisimo,

did the text.to.buf function work? i have a similar problem, but i can't seem to get the syntax right. i tried to follow the syntax shown in help, but there's still an error. if the text.to.buf function did work for you, can you post here the syntax you used?

thanks.

rupertb
17th October 2002, 13:14
Here's an example of text.to.buf, in my application I needed to merge text with normal alphanumeric description fields, text.to.buf converted the existing text to string array, merged with existing description fields - the whole lot was written out to a tmp file and then read back into the text field.

Have you used ?


#include <bic_text>


Regards,
Rupert

Juergen
17th October 2002, 13:19
declaration:

string text_buf(40,8)
...
...
...
ret = TEXT.TO.BUF("tipcs021.txta", "2", 8, text_buf)
...


In this example 8 lines from textfield tipcs021.txta (from Languagecode "2") are stored in the two dimensional array text_buf.
The value 40 in this example is the number of columns for the textwindow for text tipcs021.txta.

Example:
line3 = text_buf(1,3)


Juergen

dansimmo
18th October 2002, 03:11
I get an "unresolved reference to function 'text.to.buf' when I compile - is it available in IVc4?

dansimmo
18th October 2002, 03:16
Scrub that last remark, I forgot the #include <bic_text>

glenny04
18th October 2002, 09:51
thanks guys, i forgot to put the #include <bic_text> part too... what's that for anyway?

Juergen
18th October 2002, 11:43
The statement #include <bic_text> is used by the preprocessor (which is a built in of the compiler). With this statement you can use the various text functions (text.to.buf, text.write, text.copy .....) in your program script which a stored in the include file bic_text.
Files included between ´<´ and ´>´are searched in the directory $BSE/include<rel.number>. This directory is reserved for system headers like bic_edit, bic_help, bic_text ..........

For more information please see the tools help:
Baan Tools Main Index > Technical Information > Executables > (Relations) > Development > Compiler > Preprocessor

Juergen