Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Case statement within scan/endscan??
Message
From
15/05/2008 02:08:16
 
 
To
15/05/2008 01:56:21
Chris Sund
Silhouette Solutions
Utah, United States
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
01317223
Message ID:
01317224
Views:
8
Hi Chris

the Update at the end of your scan leaves leaves the record pointer on the last record so the scan ends.

Nick


>I don't think I've tried this before, so maybe it doesn't work. I have 2 records in my cursor and when I try to scan through them the scan exits after the first record? Within the scan I have a case statement. Does the Case/Endcase break or exit out of the scan/endscan??
>
>
>
>SELECT SPACE(2) as xstep,* FROM tselect5 WHERE BETWEEN(datetime,jfrom_date,jto_date)INTO CURSOR treport1 readwrite
>
>SCAN
>SCATTER NAME oscan
>
>WAIT WINDOW STR(RECNO())+' of '+STR(RECCOUNT()) &&& Used for testing purposes
>
>jstep=12
>
>DO CASE
>
>CASE EMPTY(oscan.nparcel_no) AND EMPTY(oscan.ccounty_fk)
>jstep=1
>CASE oscan.l1st_let_p<>.T.
>jstep=2
>CASE EMPTY(oscan.cphase1_attach1)
>jstep=3
>CASE EMPTY(oscan.ccphase2_attach1)
>jstep=4
>CASE EMPTY(oscan.cphase2_attach2)
>jstep=4
>CASE EMPTY(oscan.cphase2_attach3) and oscan.l1st_n_r<>.T.
>jstep=4
>CASE EMPTY(oscan.namount_owed)
>jstep=5
>CASE EMPTY(oscan.damount_as_of)
>jstep=5
>CASE EMPTY(oscan.cspoke_to) and oscan.lwww_lookup<>.T.
>jstep=5
>CASE oscan.l_rfa_printed<>.T.
>jstep=6	
>CASE EMPTY(oscan.dtax_sale_date)
>jstep=7
>CASE EMPTY(oscan.dcounty_struck_off_date)
>jstep=7
>CASE EMPTY(oscan.ddelinquent_tax_year)
>jstep=7
>CASE oscan.lrfa_recieved<>.t.
>jstep=7
>CASE oscan.lskip_title_search<>.T. and EMPTY(oscan.dtitle_search)
>jstep=8
>CASE oscan.l_ad_published<>.T. or oscan.l_tdmbi_printed<>.T.
>jstep=9
>CASE EMPTY(oscan.cphase3_attach1) or EMPTY(oscan.cphase3_attach2)
>jstep=10
>CASE oscan.l_proofofnotice_printed<>.T.
>jstep=11
>CASE oscan.l_request_for_deed<>.T. AND oscan.lredeemed<>.T.
>jstep=12
>CASE oscan.l_request_for_deed=.T.
>jstep=12
>ENDCASE
>	
>
>UPDATE treport1 SET xstep=STR(jstep,2,0) WHERE cprop_pk=oscan.cprop_pk
>
>ENDSCAN
>
>
Previous
Reply
Map
View

Click here to load this message in the networking platform