REETA1967
15th February 2003, 14:00
1. my query is if the value of tisfc001.osta = "documents printed"
i would like to print only "printed"

i have written the following script but it is not working


if (tisfc001.osta = tcosta.printed) then
tisfc001.osta = tcosta.printed(11;7)
endif


2. The query i have written is correct ?
can this be written in another way also

selectdo
ti.item = tisfc001
mitm.type = tisfc001.mitm(1;3)

selectdo
if (mitm.type = "PAR" OR mitm.type = "TAR" ) then
select tibom010.sitm from tibom010
where tibom010.mitm=tisfc001
endif

endselect
endselect

tools123
15th February 2003, 14:58
==================
1. my query is if the value of tisfc001.osta = "documents printed"
i would like to print only "printed"

i have written the following script but it is not working


if (tisfc001.osta = tcosta.printed) then
tisfc001.osta = tcosta.printed(11;7)
endif
===========================
There are many ways to address this issue:
1.you can declare a variable in the report script,read the value
before layout for that field into the variable and print the variable on the report to desired characters.

2.you can use POS and RPOS to organize strings the way you want.

mark_h
15th February 2003, 18:27
Check this function (http://www.baanboard.com/programmers_manual_baanerp_help_functions_enumerates_enum_descr) out. I would not use tisfc001.osta for this, since it is also an enumerated domain - I would use a variable as mentioned by tools123. So I would use a different extern variable defined as a string, then pass that variable to the report.

Mark