- 23 Aug 2024
- 1 Minute to read
- DarkLight
Condition Elements
- Updated on 23 Aug 2024
- 1 Minute to read
- DarkLight
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 |
---|---|
Name | The name of the condition element. This name will be displayed in the tree hierarchy of the content explorer of the Report Designer. |
Code | The 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). |
Condition | An 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 Actions | A list of Actions that will be executed before the condition element will be processed. |
Fail On Filter Exception | Determines 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:
[[<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.