6 formulas that retrieve the correct data from the data base, however it places spaces between the differing values as well a 6 values aren't printing on the same line. As you can see in the image that is attached there are blank lines that wont allow the all the formulas to be printed on the same line. The formulas are located within the details sections. The more formulas I have the more spaces are added. Any way to have all formulas functioning on the same line?
Request clarification before answering.
@ final
if ({RESULTS.TESTNO}='Liquid Reconciliation' or {RESULTS.TESTNO}='Reconciliation') and {RESULTS.ANALYTE}='Final Gross Weight'
then tonumber({RESULTS.FINAL})
@empty
if ({RESULTS.TESTNO}='Liquid Reconciliation' or {RESULTS.TESTNO}='Reconciliation') and {RESULTS.ANALYTE} like 'Empty*'
then {RESULTS.FINAL}
The empty calculation doesn't have tonumber bc it throws an error stating non-numerical
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Travis,
Looks like the {RESULTS.FINAL} field contains characters as well. Modify the @empty formula to:
if ({RESULTS.TESTNO}='Liquid Reconciliation' or {RESULTS.TESTNO}='Reconciliation') and {RESULTS.ANALYTE} like 'Empty*'
then
(
local stringvar temp := {RESULTS.FINAL};
local stringvar Empty;
local numbervar i;
for i := 1 to len(temp) do
(
if temp[i] IN ["0" to "9"] then
Empty := Empty + temp[i];
);
ToNumber(Empty);
)
You should now be able to do final-empty as suggested in my previous reply.
-Abhilash
OK. Could you create another formula with the code below and place it beside the original formula:
IF IsNumeric({RESULTS.FINAL}) then
"Numbers"
else
"Strings"
What does the formula return?
P.S: Does the {RESULTS.FINAL} contain NULL values by any chance? In which case you can also select 'Default Values for Null' from the Drop-down on the top in the Formula Editor Window for the @Empty formula.
-Abhilash
It returns NUMBERS. No the final should never have a null value.
so the formaula that is have an issue is: It says the empty needs to be a number, then I say tonumber then it says non numerical.
numbervar final;
numbervar empty;
final:= Maximum({@final gross wt.});
empty:=Maximum({@empty wt.});
final-empty;
| User | Count |
|---|---|
| 5 | |
| 4 | |
| 4 | |
| 3 | |
| 2 | |
| 2 | |
| 2 | |
| 2 | |
| 2 | |
| 2 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.