Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
New User, Expression question
Message
 
To
25/07/2002 12:00:09
Darrin Hughes
Chena-Don Textiles and Armory
Jacksonville, Florida, United States
General information
Forum:
Visual FoxPro
Category:
Reports & Report designer
Miscellaneous
Thread ID:
00682288
Message ID:
00682606
Views:
15
>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...
Previous
Reply
Map
View

Click here to load this message in the networking platform