Set Tag Reference

The Set Tag is used to create a variable and set its value. The name of this variable can then be referred to in other Tags using the "${VariableName}" syntax.

When a variable reference is used in an expression in the Query Pane of a Tag, the variable's value is substituted for its name before that expression is evaluated. 

For example if the value of ${var} is 4, then:

  • the comparison "=2 < ${var}" would become "=2 < 4", which evaluates to true
  • the select statement "!SELECT name FROM products WHERE ID = ${var}" would become "!SELECT name FROM products WHERE ID = 4", which would then be executed to return a data set from the data source
  • the literal string "'My ID number is ${var}." would become "My ID number is 4."

For a step-by-step example of using a Set Tag, see How Do I Use a Set Tag?

A Set Tag is different from a Query Tag in that the value of a Set Tag variable is a string or number, while the value of a Query Tag variable is a data set returned from a data source.

Set Tag Properties

Here we see the properties of a Set Tag. Below, each property is described in detail. Unless otherwise noted, each property is required.

The rest of this article describes each section of the Set Tag properties:

Tag Properties

Standard Properties

Advanced Properties

Tag Properties

nickname (optional)

The nickname will appear in the template rather than the generic "Set" label. Square brackets ("[]") will surround any text you enter here when it appears in the template to identify it as a Tag. Descriptive nicknames can be very important in designing complex templates.

var (default: varName1)

This property allows a user to set a variable name for the value returned to the Set 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 the Designer

Advanced Properties

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.