Skip to main content

Date Tag Reference

info

The Date tag is an extension of the Out tag that is more use-case specific. It is equivalent to the Out type property set to DATE.

Date Tag Functionality

The Date Tag tells the template to retrieve date data from the specified location and insert in place of the tag in the template's output. This tag type allows you to format the date data in a variety of ways using the format property. By default the date will be displayed in the your system's region (locale-specific) format.

info

Here is a sample template that demonstrates the Date tag: Date Tag Sample Template Download

Date Properties

Tag Properties

condition (optional)

Allows the creation of one or more conditions that when met apply formatting changes to the Date 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 "[date]" 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 Date 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 Date 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 Date 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 Date Tag to display its contents only if that variable's value is greater than two, then set display to "${variable} > 2".

error-handling (optional)

Selects which types of errors produce warnings rather than exceptions, which allows output to be generated despite the error.

  • Ignore type error - these errors occur when a Tag's defined data type is different than the data type of the data returned by the Tag's query
  • Ignore formatting error - these errors occur when a Tag's specified format is not compatible with the format of the data returned by the Tag's query
  • Ignore select error - these errors occur when a Tag's query fails to find valid data
  • Node must exist - these errors occur when a row or node is queried which doesn't exist in the data source. These errors typically return an empty value that is output without warning.
  • Node must not return NULL - these errors occur when a query returns an empty or NULL value. These errors typically return an empty value that is output without warning.
  • Treat warning as error - forces all of the above error-handling warnings to appear as errors (not exceptions). This is useful when used with Report Designer's Verify feature.