We have an issue with a report that is returning the incorrect value.

We use the following formulas:

CALCVAR (Report Header1)

Whileprintingrecords;

Numbervar justabove;

justabove:= 0.1;

CALCANALYSIS (Report Header2)

Whileprintingrecords;

Numbervar justabove;

Stringvar analysis;

If {field1} – {field2} >= just above then analysis:= “just below average”

Note: (The mathematical calculation of the two fields is 0.1)

DISPLAYANALYSIS (Report Footer 1)

Whileprintingrecords;

Stringvar analysis;

When DISPLAYANALYSIS is used in the report it returns nothing.

Is this something to do with rounding? Or using numbvar to store 0.1 as it works with other numbers such as 1.5 (if I change justabove:= 0.1 to justabove:= 0.5 and update the database fields to match)

Please help, I am sure I must be doing something daft.

Perhaps it would be worth testing a variation of this. Set justabove to 1 and do..

If int({field1}*10) – int({field2}*10) >= justabove then analysis:= “just below average”