Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to run fast these codes for reports
Message
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire de rapports & Rapports
Titre:
How to run fast these codes for reports
Versions des environnements
Visual FoxPro:
VFP 9
OS:
Windows XP SP2
Database:
Visual FoxPro
Divers
Thread ID:
01009899
Message ID:
01009899
Vues:
64
When i use to these codes in vf8 very good result(speed) but in vf9 very very slow. how can speed up these codes.
thanks
 monthfm=thisform.monthfm.value 
 monthto=thisform.monthto.value
 Select 6
 Set Order To code
 Set Filter To
 Replace dr With 0 All
 Replace cr With 0 All
 
 *Do While !Eof()
 LOCATE
 scan
     Replace dr With opdr
     Replace cr With opcr
    * Skip
* Enddo
endscan
 Select 6
 LOCATE
 scan
 *Do While !Eof()
     tcode = code
     Select 7
     Set Order To refno
     Set Filter To code=tcode and date<=thisform.adate.value AND BETWEEN(month,m.monthfm,m.monthto)
     Sum debit To mdr 
     Sum credit To mcr 
     Select 6
     Replace dr With dr+mdr
     Replace cr With cr+mcr
     *Skip
* Enddo
 *
 endscan
  
 *
 Select 6
 Set Order To lcode
 Set Filter To
 If !thisform.cfname.value=1
     Set Filter To code>=thisform.codefm.value and code<=thisform.codeto.value and sec>=thisform.secfm.value and sec<=thisform.secto.value and scode>=thisform.shiftfm.value and scode<=thisform.shiftto.value and lcode>=thisform.levelfm.value and lcode<=thisform.levelto.value and admtd=1 and !dr-cr=0
 Endif
 If thisform.cfname.value=1
     Set Filter To code>=thisform.codefm.value and code<=thisform.codeto.value and sec>=thisform.secfm.value and sec<=thisform.secto.value and scode>=thisform.shiftfm.value and scode<=thisform.shiftto.value and lcode>=thisform.levelfm.value and lcode<=thisform.levelto.value and admtd=1 and fname=thisform.fname.value
 Endif
 *Goto Top
locate
 Count To c
 If c>0
     Report Form (Alltrim(thisform.file.value)) Preview
     Do filter
 Endif
 If c=0
     = Messagebox('Data not found for Selected Critarea', 32, product)
     Return .T.
 Endif
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform