Use masks in analyses
Using masks you can format numbers/amounts and dates in analyses and reports.
The specified mask applies to every line generated for the section. You can use masks to edit fields. Using masks, you can, for example, ensure that fields that have a negative value on the declaration, are shown as a positive amount in the report. You use the # character to enter a mask. Currently you can use the following masks:
- A#: decimal separator.
Usage: ~#A#fieldcode~. For example: ~#A#1234567~ becomes 1.234.567 in a report. (If you specify a field code, that would look like this: ~#A#E01F003~ )
- #B#: decimal separator and make the number negative (negative amount becomes positive)
Usage: ~#B#fieldcode~. For example: ~#B#1234567~ becomes -1.234.567 in a report.
- #E#: decimal separator and negative number is shown between (brackets)
- Usage: ~#E#fieldcode~. ~#E#-1234567~ (a negative amount) looks as follows in a report: (1.234.567).
- #O#: decimal separator and negative number is shown between (brackets)
Usage: ~#O#fieldcode~ For example: ~#O#1234567~ becomes (1.234.567).
- #D#: Convert a date format so the month name is written in full.
Usage: ~#D#fieldcode~. The date ~#D#01-01-2008~ is shown as: 1 januari 2008.
If you use #D=EN#, the date is shown in English.
- #.*: Show a deviating number of decimals
When the report is formatted, the asterisk will be replaced by the number of decimals that applies to the relevant line.
In an analysis you can align the columns for fields with a variable number of decimals on the decimal separator. You do this by assigning the following mask to the entire column: #,##0<question marks>. Instead of <question marks> you add a specific number of question marks. For the number of decimals, use the highest number of decimals defined in the linked decimal field.
Below you see some applications of this mask:
Without formatting
0 digits behind
the decimal separator1 digit behind
the decimal separator2 digits behind
the decimal separator3 digits behind
the decimal separator4 digits behind
the decimal separator1234
1234
1234
1234
1234,
1234,
123,4
123
123,4
123,4
123,4
123,4
12,34
12
12,3
12,34
12,34
12,34
1,234
1
1,2
1,23
1,234
1,234
0,1234
0
0,1
0,12
0,123
0,1234
If in the Report generator a field with a variable number of decimals is placed in a (group) header or footer, it will be considered to be a standard decimal field. The mask (#.*) is not applied, but converted to a default decimal mask.