English

Problem: Label expression produces incorrect results for field calculation

Description

When specifying a label expression that involves numeric fields, the resulting label is incorrect. The Verify option, however, indicates that the expression is correct.

Cause

The field formatting is not correctly maintained in the resulting label.

Solution or Workaround

Make sure you typecast the result in the label expression. For example, clng([field]) converts the value of the [field] to an integer of type long.

The following example divides two numeric fields and calculates the population per sq/km; the result is an integer value:

Code:
clng([POP_CNTRY] / [SQKM_CNTRY])