Number Tag Reference
The Number tag is an extension of the Out tag that is more use-case specific. It is equivalent to the Out type property set to NUMBER.
Number Tag Functionality
The Number Tag tells the template to retrieve numeric data from the specified location and insert in place of the tag in the template's output. This tag allows the incoming data to be interpreted as a locale-specific number, with locale-specific decimal and thousands separators, etc. This tag type also allows you to format the number data in a variety of ways (i.e. currency, fractions, etc) using the format property.
Here is a sample template that demonstrates the Number tag: Number Tag Sample Template Download
Number Properties
Tag Properties
condition
(optional)
Allows the creation of one or more conditions that when met apply formatting changes to the Number Tag output. For more information about its usage, see How Do I Conditionally Format an Out Tag's Output?
format
(optional)
Set the format pattern to use when displaying the data. See Using the Format Data Interface for more details. You can also set the format manually if needed. The format set here determines the output of your data when it's generated.
nickname
(optional)
The nickname to reference the tag rather than the generic "[number]" label. Descriptive nicknames can be very important in designing complex templates.
var
(optional)
This property allows a user to set a variable name for the value returned to the Number Tag. The variable can be referenced in other Tags after it is set and used for comparisons, additional printing, filtering, etc.
Standard Properties
description
(optional)
A brief description of this Tag.
enabled
(default: on)
Controls whether a Tag is executed when generating output. This can be useful when debugging a template.
- on - this Tag will be executed when output is generated.
- off - this Tag will not be executed when output is generated.
- engine-only - this Tag will be executed only if output is generated using one of the Report Engines.
- autotag-only - this Tag will be executed only if output is generated using Report Designer.
Advanced Properties
default
(optional)
Set this property to the text to display if the Number Tag's query selects a node or field that doesn't exist. If the node or field selected does exist but is empty (has no value), then nothing is displayed; so if you see nothing in your output were you expect something to be displayed, your Number Tag query may have selected a node or field with no value.
display
(optional, default: always)
Set this property to determine whether or not to display data. The default value can always be overwritten using the display.default setting in the properties or configuration file. Options for display are:
- notEmpty - display the output data only if the data returned is not an empty value or empty string
- notNull - display if the data node or field exists, even if it is an empty string (an empty string is not NULL since NULL is an actual value in a database)
- always - (default) display even if the data does not exist (a blank will show if the data does not exist).
- A Boolean expression that evaluates to true or false. For example, if you have a Set Tag variable "${variable}" whose value is a number, and you want your Number Tag to display its contents only if that variable's value is greater than two, then set display to "${variable} > 2".