Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Sum and replace
Message
De
22/11/2006 08:55:19
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Sum and replace
Versions des environnements
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP
Database:
Visual FoxPro
Divers
Thread ID:
01171725
Message ID:
01171725
Vues:
60
hi all,

i need help to fix this code under ,
**this part it works fine
SELECT str_nmbr,stk_name,stk_clas,stk_code,stk_opbl FROM stk_clas ;
 WHERE str_nmbr =thisform.text1.Value AND ;
  BETWEEN (stk_clas,thisform.text4.Value,thisform.text5.Value);
  INTO CURSOR aa
  brow
**this code need your experience
SCAN  FOR trn_rqb3.str_nmbr=aa.str_nmbr AND trn_rqb3.stk_code=aa.stk_code
   AND BETWEEN (TRN_DATE,thisform.text2.Value,thisform.text3.Value);
 IF FOUND()
   SUM trn_typ=1 TO m.in1
   SUM trn typ=44 AND trn_typ=55 TO m.out1
   replace newfield as(insert1) WITH m.in1
   replace newfield as(outitem) WITH m.out1
   replace newfield as(balance) WITH (m.in1 +stk_opbl)-m.out1 
  else
   replace newfield as(insert1) WITH 0
   replace newfield as(outitem) WITH 0
   replace newfield as(balance) WITH 0
 ENDIF
ENDSCAN
  
*  REPORT FORM myreport 
thanks
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform