Sybase 2 Barcode Reader User Manual


 
CHAPTER 8 Displaying and Validating Data
DataWindow Designer User’s Guide 233
Using special
characters
To include a character in a mask that has special meaning in a display format,
such as [, precede the character with a backslash (\). For example, to display a
single quotation mark, enter \'.
Setting display
formats at runtime
In code, you can use the Format property to get and set the format for a column.
Number display formats
A number display format can have up to four sections. Only the first is
required. The three other sections determine how the data displays if its value
is negative, zero, or
NULL. The sections are separated by semi-colons:
Positive-format;negative-format;zero-format;null-format
Special characters
Table 8-2 lists characters that have special meaning in number display formats.
Table 8-2: Characters with special meaning in display formats
Percent signs, decimal points, parentheses, and spaces display as entered in the
mask.
Use at least one 0
In general, a number display format should include at least one 0. If users enter
0 in a field with the mask ###, the field will appear to be blank if you do not
provide a zero-format section. If the mask is ###.##, only the period displays.
If you want two decimal places to display even if both are 0, use the mask
##0.00.
Number keywords
You can use the following keywords as number display formats when you want
DataWindow Designer to determine an appropriate format to use:
[General]
[Currency]
Note that [Currency(7)] and [Currency(n)] are legal edit masks, but they are not
legal display formats.
Character Meaning
#A number
0 A required number; a number will display for every 0 in the mask