Hello Duane
Hope you prove me wrong because I can't identify a mistake in the Report
Expressions which I use - why the Report displays different results on
different PCs beats me! I shall try to explain. My Testdata table contains
several fields, here is a list of the fields I think are relevant to
explaining where the problem lies:
SerialNumber (Text)
TestQty (Integer)
Pass? (Yes/No)
Retest? (Yes/No)
Return? (Yes/No)
WO Number (Long Integer)
pstk Part Number (Text)
I have a totals SumOfTestQty query which works correctly on all PCs. It
filters by "WO Number",1st pass and no Returns from the field (ie: both
"Retest?" and "Return?" set to filter out Zero/No).
I have 2 text boxes in my report footer which try doing the same simple
calculation, but consistantly display the incorrect results on some PCs! The
report takes data from a query of queries all filtering by "WO number" and by
Return?=Zero/No. The report details "TestQty", "Serial Number" , "Pass?" and
"Retest?" tick boxes and Running Sum = Over All and other fields which I
think are not directly relevant to the maths. In Report Detail tab I also
have text box "TotalTestedThisBatch" which sums up the passes ie:
=-1*[Pass?]*[TestQty] and "Total_1stTimePass" which XORs "Pass?" and
"Retest?" to sum up the 1st time pass Test Quantity ie: =-1*([Pass?] Xor
[Retest?])*[TestQty] - both of these are Running Sum = Over All in Report
Details tab. I then have the two fouling text boxes in the Report Footer,
which display the results of these 2 text boxes.
Sample data from query is below, please copy and paste into a full size
window text file to review formatting properly
) These are the desired
results where SumofTestQty and Yield are always correct. The undesired
results are only viewable in Report Mode so I can email as attachement if you
let me know how, but basically the reported data give undesired equivalent to
SumofTestQty of 25 and 100% yield! By the way this is not a printer driver
issue, wish it was!
-----
SerialNumber Return? pstk WO
Number TestQty Pass? Retest? AllTestedNoReturns Yield Total1stPass SumOfTestQty
0 137-903TST 10127 25 -1 0 83 0.951807228915663 75 79
0 137-903TST 10127 1 -1 0 83 0.951807228915663 75 79
0 137-903TST 10127 3 -1 0 83 0.951807228915663 75 79
0 137-903TST 10127 1 -1 -1 83 0.951807228915663 75 79
0 137-903TST 10127 1 -1 -1 83 0.951807228915663 75 79
0 137-903TST 10127 1 -1 -1 83 0.951807228915663 75 79
0 137-903TST 10127 1 -1 -1 83 0.951807228915663 75 79
0 137-903TST 10127 21 -1 0 83 0.951807228915663 75 79
0 137-903TST 10127 1 0 0 83 0.951807228915663 75 79
0 137-903TST 10127 1 0 0 83 0.951807228915663 75 79
0 137-903TST 10127 1 0 0 83 0.951807228915663 75 79
0 137-903TST 10127 1 0 0 83 0.951807228915663 75 79
0 137-903TST 10127 25 -1 0 83 0.951807228915663 75 79
-----
Thanks
Buddy
Duane Hookom said:
How about providing some of the "Expressions in a report to do the
calculation", sample data, desired results, and un-desired results.
Clearly, three of us attempting to help you have never had a miscalculation
in a report that uses expressions (no code) where we haven't made an error in
the expression.