shellybabber
1st August 2011, 13:57
Hi Guys,

I am facing problem in trimming one field.I am printing field tccom100.nama in report which is 30 char long and want to trim the field if field has spaces afterwards.
Eg. value in tccom100.nama is AIIMS so want to trim spaces after AIIMS.

I am using trim$ function but its not working.Can any one tell me how to do this?

Thanks
Shelly

ks_ks_
1st August 2011, 14:02
use shiftl$(shiftr$(tccom100.nama))

mark_h
1st August 2011, 15:54
Or just try strip$.

_Ralph_
1st August 2011, 16:49
trim$() should work. did you checked if the variables were declared as fixed?

You are speaking about the blank spaces on the report? They, wont go anywhere :p

BaanInOhio
1st August 2011, 16:52
Depends on the variable that you are stripping (or trimming) into. If the destination of the strip is a string variable declared as FIXED, your strip will never work, since the variable will retain the maximum string length. If you really want to ensure that the variable is stripped before sending it to a report or form, move the field content into an extern string that is not defined as FIXED, then shiftl$ and/or strip$ using that variable.