Crystal function to VB.NEt

iamscott

New member
Joined
Oct 2, 2007
Messages
1
Programming Experience
Beginner
Hi All,

How would a function be written to look at fields in an SQL table and retrieve only the non-numeric portion of the data in the field? In the example below how would you write a vb function look for just " XYZZ".
The function will reside in MRS for a report, also note most data in the field is alpha-numeric.

Here's the existing Crystal Code:
If Left({AV_ACTIVITY.ACT},4)="XYZZ" then {@HrsWk1} else 0

Thanks a bunch!

>scott

:rolleyes:
 
you should filter in the sql query

select * from
T_mytable a
where a.MyField like '%XYZZ%'

but in straight vb the way to search a string is

if instr(myfield,"XYZZ") > 0 then
'here's your code
end if
 
Back
Top