Skip to content

Zero_suppress Field Property/Print Option

Obsolete

This format option is obsolete. It is valid only in character-mode DataFlex. Refer to the Field Options property in the DataDictionary class.

Purpose

To blank the display of numeric items and output windows having a value of zero instead of the default display of zero(es).

Syntax

set field_options field file.field to dd_zero_suppress

or

entry_item file.field {zero_suppress}

or

print window [zero_suppress]

What It Does

The zero_suppress option causes the display of Number, Integer, and Real output windows to show the value of zero as spaces instead of the default display of spaces followed by the last zero to the left of the decimal point and, for windows specified to display decimal values, the decimal point followed by a zero in each position to the right.

print image.3 {zero_suppress}

In this example, all values of zero printed through the third window of Image would appear as blank space on the screen. The space specified by the definition of the window would be occupied by spaces.

An effect similar to that of zero_suppress can be attained by embedding the letter Z among the underscores of a Number type window.

Displays of zeroes can be suppressed at the field level by applying this field property in a DataDictionary object with the field_options property.

set field_options field transact.amount to dd_zero_suppress

This line would cause all entry items addressing Field amount in File transact in DEOs using the DataDictionary to display spaces instead of zeros whenever the field value was zero.

Notes

  • zero_suppress will appear not to work where a small absolute value is put to a window. For example, if a window specifies integer-only display (e.g., _____) and a value less than 1 is put to it (e.g., 0.5), a zero will display in the window. Only a value that is truly zero (such as 5 - 5) will be displayed as blanks.