Edit Masks
Edit Masks for Numeric Data Elements
Using Edit Masks to Apply Color to Numeric Data Elements
Edit masks can include signifying information to specify color for numeric data elements based on the value of the element. When applying color to edit masks, the masks are always arranged in the following order:
Mask 1 (positive value); Mask 2 (negative value); Mask 3 (zero value)
Note that the masks must be separated by semi-colons.
The color is assigned to the mask by entering the name of the color to be applied to the mask immediately following the mask itself. The color name must be enclosed in brackets, as seen in the example below:
##,###.##[black]; ##,###.##[red]; ##,###.##[blue]
The color options available are as follows:
- Black White
- Blue Dk Blue
- Cyan Dk Cyan
- Green Dk Green
- Magenta Dk Magenta
- Red Dk Red
- Yellow Dk Yellow
- Lt Gray Dk Gray
If no color is entered as part of the mask, the default color will be applied. For example, if the default color for the data element is green and the edit mask is entered as:
##,###.##; ##,###.##[red]; ##,###.##
The positive values (first position) and the zero values (third position) will use the default color, in this case green. Only the negative values (second position) will use the unique color, in this case red.
The following illustrates the use of the edit mask field. In each example, a numeric field is being formatted.
12,345 12345 *,***
*1,234 1234 **,***
**123 123 *,***
** *12 12 **,***
** **1 1 **,***
** *** 0 *,**
12,345 12345 &&,&&&
01,234 1234 &&,&&&
01,234.56 1234.56 &&,&&&.&&
12,345 12345 ##,###
1,234 1234 ##,###
123 123 ##,###
12 12 ##,###
1 1 ##,###
0 ##,###
1 -1 ##,###
12345.67 12345.67 ##,###.##
.01 0.01 ##,###.##
.01 -0.01 ##,###.##
1,234.56 -1234.56 -##,###.##
123.45 -123.45 -##,###.##
-123.45 -123.45 --#,###.##
($12,345.67) -12345.67 ($$$,$$$.&&)
( $123.45) -123.45 ($$$,$$$.&&)
$123.45123.45 ($$$,$$$.&&)
($12,345.67)-12,345.67 (($$$,$$$.&&)
( $12.34)-12.34 (($$$,$$$.&&)
$12.3412.34 (($$$,$$$.&&)
($12,345.67)-12,345.67 (((,(($.&&)
($12.34)-12.34 (((,(($.&&)
$12.3412.34 (((,(($.&&)
The edit masks for numeric data elements consist of ten characters interpreted as follows:
* This character fills any positions in the display field not occupied by digits with asterisks (*).
& This character fills any positions in the display field not occupied by digits with zeroes.
# This character fills any positions in the display field not occupied by digits with blanks.
, This is displayed as a comma if there are digits to the left. Otherwise it is blank.
. This is displayed as a period marking the decimal point in the number. There may only be one period in any edit mask.
- This character is a literal. It is displayed as a minus sign when the number is less than zero. Otherwise it is blank. Several negative signs in a row will float to the right-most position which does not interfere with the digits of the number. If a dollar sign ($) follows a group of minus signs, it and the minus signs float together. That is, the left-most digit will be immediately preceded by a $ and then a minus sign will be in front of the $ if the number is less than zero.
+ This character is a literal. It is displayed as a minus sign when the number is less than zero. Otherwise it is a plus sign. Several positive signs in a row will float to the right-most position which does not interfere with the digits of the number.
( This character is a literal. It is displayed as a left parenthesis when the number is less than zero. Otherwise it is blank. It is the accounting parenthesis that is used in place of the minus sign to indicate a negative number. Several left parentheses in a row will float to the right-most position which does not interfere with the digits of the number. If a dollar sign ($) follows a group of left parentheses, it and the parentheses float together. That is, the left-most digit will be immediately preceded by a $ and then a left parenthesis will be in front of the $ if the number is less than zero.
) This character is a literal. It is displayed as a right parenthesis when the number is less than zero. Otherwise it is blank. It is the accounting parenthesis that is used in place of the minus sign to indicate a negative number. One of these characters generally closes a format string that begins with a left parenthesis.
$ This character is a literal. It is displayed as a dollar sign. When several dollar signs are grouped in a row, a single dollar sign floats to the position immediately to the left of the left-most digit of the number. See above for how it floats together with a minus sign or left parenthesis when it follows one of these two characters in the format string.
Edit Masks for Date and Time Data Elements
The following table illustrates the use of the edit mask field. In each example, a date and time field containing November the fourteenth, nineteen-hundred and ninety-four, 45 seconds past one-thirty in the afternoon (November 14, 1994 at 1:30:45pm) is being formatted. This date falls on a Monday.
111494 mmddyy
141194 ddmmyy
941114 yymmdd
94/11/14 yy/mm/dd
94 11 14 yy mm dd
1994 14 11 yyyy dd mm
11-14-94 mm-dd-yy
Nov. 14, 1994 mmm. dd, yyyy
Nov 14 1994 mmm dd yyyy
(Mon) Nov. 14, 1994 (ddd) mmm. dd, yyyy
Mon, 11-14-1994 ddd, mm-dd-yyyy
Nov. 14, 1994 at 13:30:45 mmm. dd, yyyy at HH:MM:SS
The edit masks for date and time data elements consist of characters interpreted as follows:
dd Day of the month as a 2-digit number (01-31)
ddd Day of the week as a 3-letter abbreviation (Sun through Sat)
jjj Day of the year as a 3-digit number left-filled with zeroes (Julian)
mm Month as a 2-digit number (01-12)
mmm Month as a 3-letter abbreviation (Jan through Dec)
yy Year as a 2-digit number relative to its century (00-99)
yyyy Year as a 4-digit number (0001-9999)
HH Hour of the day as 2-digit number (01-24)
MM Minutes of the hour as a 2-digit number (00-59)
SS Seconds of the minute as a 2-digit number (00-59)
All other Characters in a date or time edit mask will be printed as entered
Edit Masks for Character Data Elements
The following six characters in the edit mask of a character-type field cause the contents of the field to be displayed on the report as indicated.
All other characters in the edit mask field will be printed as entered.
# Digits 0-9 will be displayed
A A-Z and a-z will be displayed
N Combination of the above two; all alphanumerics will be displayed
L All alphabetic characters will be displayed in lower case
U All alphabetic characters will be displayed in upper case
X All characters in field will display as entered