yogesh kapil
12th April 2013, 06:59
Hi,
I m working on table tccom120, i need to print first 20 charcater of tccom120.txta field.
bhushanchanda
12th April 2013, 07:11
function get.text()
{
select tttxt010.*
from tttxt010
where tttxt010._index1 = {:tccom120}
selectdo
endselect
}
Then on the report add the field tccom120 and keep the print length of the field as 80.
JaapJD
12th April 2013, 11:16
First of all: where do you need to print this? If it is in an LN report, you can do this in the report script.
detail.<n>: |* the detail (or other layout) where the text is printed
before.layout:
text.printed = false
field.tccom120.txta:
before.print:
if not text.printed then
lattr.prline = lattr.prline(1;20)
text.printed = true
lattr.print = true
else
lattr.print = false
endif
yogesh kapil
13th April 2013, 06:14
Hi Bhushan,
okay..thanks i always thinking why i not able to see text in the tccom120.txta table. this means tttxt010 is the reference table for aal the text.
One more thing i want to ask why always the field tccom120.txta is always having same value 0...
actually when i write your given code i get some error like 'tccom120' not declared,
i am also get confused where we match our line text with reference table.
according to me the code should be like this...
select tttxt010.*
from tttxt010
where tttxt010.ctxt = :tccom120.txta
selectdo
endselect
but this is also not working.,,,,,,,,,
function get.text()
{
select tttxt010.*
from tttxt010
where tttxt010._index1 = {:tccom120}
selectdo
endselect
}
Then on the report add the field tccom120 and keep the print length of the field as 80.
bhushanchanda
13th April 2013, 07:15
Hi Kapil,
That was just for your refernce.
You can remove that function from your script.
What you need to do is, put your field i.e. tccom120.txta on your report and keep its print length equal to 80 or the number of columns mentioned in this session :- tttxt1520m000. I keep it 80.
Attaching a sample script. Where I print my sales quotation text.