shahromi
11th February 2016, 09:32
Hi All,
In report layout, I need to display Purchase Requisition ITEM TEXT.
Managed to display the data, but unfortunately it will display many lines (based on item text).
Is there any way that I can accumulate and make it to display only into 1 single line.
Thank you.
bhushanchanda
11th February 2016, 11:18
Hi,
You can go for text.to.buf() function.
function long export_tttxt010(domain tcitem item)
{
string stxt(3256)
string sbuf(80,40)
long ftxt
long i
|* Fetch the text field
select tiitm001.txta
from tiitm001
where tiitm001._index1 = {:item}
selectdo
|* If not empty...
if tiitm001.txta <> 0 then
for i = 1 to text.to.buf("tiitm001.txta", language$, 40, sbuf)
stxt = strip$(stxt) & "~" & strip$(sbuf(1,i))
endfor
|*Here you can print the data and stxt will have complete text
|* Put stxt in your report input fields and add it to report layout
endif
endselect
return(0)
}
Reference - Thread (http://www.baanboard.com/baanboard/showthread.php?t=12965)
shahromi
16th February 2016, 04:00
Hi Bhushan,
Thanks for your reply.
I am getting this error:
Unresolved reference to function 'text.to.buf'.
Can't read dd for table 'ttiitm001'.
Unknown table 'tiitm001' (error 302)
FYI:
I am using ERP LN FP7.
Thank You.
shahromi
16th February 2016, 04:54
Hi,
May someone give me the file name should I include to enable me to use
text.to.buf function.
Thank You.
bhushanchanda
16th February 2016, 05:21
Hi,
Try using #include <bic_text>
shahromi
16th February 2016, 07:03
Hi Bhushan,
Its works.
Coding in my program:
declaration:
#include <bic_text>
string stxt(3256)
string sbuf(80,40)
long ftxt
long i
before.program:
detail.1:
before.layout:
stxt = ""
if tdpur201.txta <> 0 then
for i = 1 to text.to.buf("tdpur201.txta", language$, 40, sbuf)
stxt = strip$(stxt) & " " & strip$(sbuf(1,i))
endfor
|*Here you can print the data and stxt will have complete text
|* Put stxt in your report input fields and add it to report layout
endif
Thank You.