fonn


I would like to seek help in writing a program in FoxPro 7.0 to open the memo field "expr" in many different reports, in which specific keywords "DUPLEX=1" or "DUPLEX=2" is stored in the memo field "expr".

P.S. The keyword "DUPLEX=1" or "DUPLEX=2" is not the only things stored in the memo field. The keyword appears in different lines of the memo field "expr" for different reports.

How to write such porgram mentioned above Please help......




Re: (HELP) how to write a program for keyword search in memo field

hangover


You could use ...

LOCATE ALL FOR AT ("DUPLEX=1", expr) + AT ("DUPLEX=2", expr) > 0

or do similar with SET FILTER or a SELECT-SQL statement depending on which works best for you.







Re: (HELP) how to write a program for keyword search in memo field

Naomi Nosonovsky

locate for 'DUPLEX' $ upper(Expr) && I think it would be enough to search for DUPLEX

BTW, AFAIK it's always the first record in the report that may contain DUPLEX keyword.






Re: (HELP) how to write a program for keyword search in memo field

CetinBasoz

Code Block

local ix,lcReportsFolder

local array aReports[1]

lcReportsFolder = getdir()

for ix=1 to adir(aReports, addbs(m.lcReportsFolder)+"*.frx")

use ( addbs(m.lcReportsFolder) + aReports[m.ix, 1] )

if atc("duplex", expr) > 0

aReports[m.ix, 1]

endif

use

endfor