anandpr1989
9th April 2015, 10:25
Hi All,

I have created 4 GL report and I want to print PO line text in that. For some purchase orders text present in multiple lines and now while running report it shows second line text in new line. So what is way to print text in single line to avoid \n.

Please help.

Thanks in advance.

bhushanchanda
9th April 2015, 11:26
Hi,

In your report, you can store the text in a string variable with a longer length and put that in your report layout. For that, you can use, text.to.buf() function.

bpanda
9th April 2015, 12:34
Hello,

You can try like this sample code (This is for 10 lines of text with each line of 80 characters);

declaration:
extern domain tcmcs.str80 text(15)
extern domain tcmcs.str100m taxt
long i
long rc

#include <bic_text>



rc = set.mem(text, "")
rc = text.to.buf("tcibd001.txta", language$, 10, text)

taxt = ""

for i = 1 to 10
taxt = strip$(taxt) & " " & text(1,i)
endfor

free.mem( text )

Thanks & Regards
Biswajyoti Panda

anandpr1989
13th April 2015, 07:43
Hi All,

Thanks for your reply. It helps for me. Thank You.

But after applying this I have got new issue as if text is as like below -

WO 10025
1) PO 5221 Qty 15
2) PO 2552 Qty 25

It splits text from Qty 15 in next column.

When I run program using debugger, it shows values as 'PO 5221^Immmmmmm'. So how I can remove ^I?

Otherwise remaining all texts appears correctly.

Please help. Thanks in advance.

mark_h
13th April 2015, 16:43
In the code just check for the ascii code chr$(9) - I think that is ctrl-I. Then instead of adding test(1,i) just add a space. So basically you roll thru every character of text and can skip or replace any give character string.

anandpr1989
14th April 2015, 14:42
Thanks to all.

Issue is resolved.