Condition Elements
  • 06 Sep 2024
  • 1 Minute to read
  • Dark
    Light

Condition Elements

  • Dark
    Light

Article summary

General

Condition elements can be used to exclude certain parts of a Template based on a condition.

Properties

This type of report element has the following properties:

Name

Description
NameThe name of the condition element. This name will be displayed in the tree hierarchy of the content explorer of the Report Designer.
CodeThe code of the condition element. There must be no other report element within the same report with the same code. The code is used to reference the report element from within a Template (see below).
ConditionAn optional condition Expression; if it returns True or 1 the condition is considered to be fulfilled and the portion encapsulated by the condition element will be included in the report document. If it returns something other than True or 1 the portion encapsulated by the condition report element will be excluded. If you leave this property empty, the condition is considered to be always fulfilled. The condition expression is evaluated after the preparation Actions of the image element have been executed.
Preparation ActionsA list of Actions that will be executed before the condition element will be processed.
Fail On Filter ExceptionDetermines what shall happen if an exception occurs when executing a preparation action that performs a filter (e.g. because the value to which you want to filter does not exist). When enabled, an exception will be thrown and the report document creation will be cancelled; when disabled, the portion encapsulated by the condition report element will be excluded.

Template Insertion

You can place a reference to the condition element in a text shape of the template using the following syntax:

Condition Element Reference

[[<code>]]

Such a reference text shape is automatically created if you drag & drop the condition element from the content explorer onto a slide of the template. If the condition is not fulfilled, the slide on which the reference is placed will be excluded from the report document.


Was this article helpful?