Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
What would you print in case of 0?
Message
From
03/07/2008 16:55:45
 
General information
Forum:
Visual FoxPro
Category:
Reports & Report designer
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows XP
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01328757
Message ID:
01328883
Views:
6
This message has been marked as a message which has helped to the initial question of the thread.
>>>>(Weight variance / Nominal weight) * 100
>>>
>>>Wow, I'm now thinking I created this report incorrectly. I need to divide by a weight, not a variance that is the difference between weight and other weights (they should sum up). I believe I messed up, let me re-check the requirement.
>>
>>If that's true, then your original problem goes away. I'm a great believer in not trying to fix problems that shouldn't exist in the first place < g >
>
>Yes, you were right. Here is the requirement
>
>And on the same report if possible she is also looking for each weight field to have the percentage of weight for each field relative to the stockwt.
>
>I worked at night (around 12am) and didn't realize my mistake.
>
>BTW, what if StockWt is 0? I better add a check for this anyway :)

Of course. In that case I'd report 0 as the percentage (or, you could leave it blank). Saying there is 0% variance on a stock weight of 0 is meaningful.

It might get interesting if you're doing counts or averages in the report - you might have to exclude detail lines from those calculations where stock weight is 0, depending on the results desired.
Regards. Al

"Violence is the last refuge of the incompetent." -- Isaac Asimov
"Never let your sense of morals prevent you from doing what is right." -- Isaac Asimov

Neither a despot, nor a doormat, be

Every app wants to be a database app when it grows up
Previous
Reply
Map
View

Click here to load this message in the networking platform