Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
One SCAN FOR statement with two different criteria.
Message
De
08/10/2000 17:28:09
Cindy Winegarden
Duke University Medical Center
Durham, Caroline du Nord, États-Unis
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00426667
Message ID:
00426668
Vues:
21
Elgin,
cScanCriteria = [CustId = ] + STR(CustId)
SCAN FOR &cScanCriteria
    *!* Do stuff here
ENDSCAN
>I have a stored procedure that is used to create a report cursor. In this procedure is a SCAN FOR.... END SCAN that has alot of code in between for selecting data from my 5 child tables that I do not want to repeat if possible. However, I would like to give the user a few options for selecting the Parent records that will be included in the report.
>
>The statment currently looks like this for running the report for the currently selected Parent record:
>
>SELECT Namplatv
>SCAN FOR Custid = gcCustid AND Upsino = gcUpsino
>
> Alot of Code for Building reportcursor.
>
>ENDSCAN
>
>I would like to give them the option to select All records for the current CUSTID like:
>
>SELECT Nameplatv
>SCAN FOR Custid = gcCustid
> Alot of Code..
>ENDSCAN
>
>Or even a Range of records specified. This Stored procedure is launched from a button on a form called "ReportSelect" that I use to set which of two report forms to be used.
>
>I don't know how to change my "SCAN FOR" criteria according to what they select. I've tried using variables in place of the criteria and as expected did not work.
>
>Not sure if I'm approaching this correctly. My main goal is to not have to repeat all that code within the SCAN command.
>
>Thanks a million.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform