is there something in crystal that well allow me to find character in a fields like Charindex in SQL. It needs to be able to go thru the whole field and chars must start in a old number location.
If there is only one occasion of the character(s) you can use;
if remainder (instr({@abc},{?look up}),2)=1
then do this
else do something else
If there are multiple occasions of the string, the following loop will check each occurance of the string. The loop will search for any size string. (within the Crystal limits of course). The loop will also indicate whether the searched for string is present in the original.
change the following fields:
{abc} to the string you are evaluating,
{look up} to the field or string you want to check for,
if instr(check,what)<> 0 then (
for loop:= 1 to length(check) do(
if instr(check[loop to length(check)],what)<>0 then
(if (check [loop to loop + lngth-1] = what and
remainder(loop,2)=1) then
(a:="okay" ;loop:=loop+lngth+1) else
if (check [loop to loop + lngth-1] = what and
remainder(loop,2)=0) then
(a:="error" ; loop:=length(check)))
else (loop:=length(check)));a)
else "string not found"
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.