Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
New User, Expression question
Message
 
À
25/07/2002 12:00:09
Darrin Hughes
Chena-Don Textiles and Armory
Jacksonville, Floride, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire de rapports & Rapports
Divers
Thread ID:
00682288
Message ID:
00682606
Vues:
13
>OOPS...
>Seems the boss was slightly unclear about which totals he wanted...
>
>The coding as it stands now is:
>
>REPORT FORM CDIPIU FOR LEFT(IN_STOCK,2) <> "LP" TO PRINTER
>
>Now I need it NOT to print any entry with an iutotal AND in_onhand equal to 0. iutotal tracks the number used over the course of the reporting cycle and in_onhand is just the number we have in the building. If either of them has a total other than zero I need the entry to print, but if BOTH are 0 I need to exclude it from the report...
>
>Help?


You've almost solved your own problem. Your sentence:
NOT to print any entry with an iutotal AND in_onhand equal to 0
becomes
NOT( iutotal + in_onhand = 0 )
.....or did you mean
NOT( iutotal>0 AND in_onhand=0 )

So your code becomes
REPORT FORM CDIPIU FOR ( LEFT(in_stock,2)<>"LP" ) AND ( NOT(iutotal>0 AND in_onhand=0) ) TO PRINTER
I find parentheses help me read an expression even when the compiler does not need them.

HTH,
Randy Bosma
VFP - Because life is too short to code in something else...
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform