Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Print via myform
Message
De
08/11/2004 14:47:36
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivie
 
 
À
08/11/2004 14:16:12
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Versions des environnements
Visual FoxPro:
VFP 5
Divers
Thread ID:
00959007
Message ID:
00959317
Vues:
9
>hi,
>
>i mean if you can have another way to rewrite mycdoe,to get that data
>
>as mygrid.
>
>thanks
>m.qasem

Yes, I usually prefer to put data into a cursor, for a report.

Your orginal code:
locate for UPPER(inname) = UPPER(TRIM(thisform.pageframe1.page1.text1.Value)) and nam1 = thisform.pageframe1.page1.text4.Value and datein>=thisform.pageframe1.page1.text3.value .and. datein<=thisform.pageframe1.page1.text5.value 
if found()
    set filter to UPPER(inname) = UPPER(TRIM
     (thisform.pageframe1.page1.text1.Value))    
     and nam1 =thisform.pageframe1.page1.text4.Value and     
     datein>=thisform.pageframe1.page1.text3.value .and. 
     datein<=thisform.pageframe1.page1.text5.value

     report form mstr22 preview
else
  =messagebox("not found")
endif
Changing this to SELECT:
select from MyTable where UPPER(inname) = UPPER(TRIM
     (thisform.pageframe1.page1.text1.Value))    
     and nam1 =thisform.pageframe1.page1.text4.Value and     
     datein>=thisform.pageframe1.page1.text3.value .and. 
     datein<=thisform.pageframe1.page1.text5.value;
  into cursor TempReport;
  nofilter
if _tally = 0
  MessageBox("No records selected. Try changing your criteria.")
else
  report form ...
endif
select ... && go back to the table that belongs to the grid
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform