- 23 Aug 2024
- 2 Minutes to read
- DarkLight
Image Elements
- Updated on 23 Aug 2024
- 2 Minutes to read
- DarkLight
General
This type of report element can be used to load an image from a local or UNC file path or a web URL and insert it into the Template.
Example: You can load the company logo of your report recipients dynamically from the file system and read the path to the image file from a Datasource variable or field.
Properties
Image elements have the following properties:
Name | Description |
---|---|
Name | The name of the image element. This name will be displayed in the tree hierarchy of the content explorer of the Report Designer. |
Code | The code of the image 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 image will be included in the report document. If it returns something other than True or 1 the exclusion settings (see below) will be applied. 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 image 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 exclusion settings (see below) will be applied. |
Source URI | An Expression that returns a string that contains the URL from which to load the image. This can be a local or UNC file path or a web URL. |
Keep Original Size | When enabled the original size of the image will be kept by ignoring the size of the placeholder of the image element in the template. |
Exclusion Behavior | Exclude Element. When choosing this option and the image needs to be excluded, the graphic will simply be ommitted from the output and an optional replacement text (see below) may be inserted. |
Replacement Text | An optional Expression that evaluates to a string that contains the replacement text to insert into the report document when the image element needs to be excluded (e.g. if the condition is not fulfilled). |
Insertion
You can insert the placeholder for the image element by dragging and dropping the report element from the content explorer of the Report Designer into the template. You will then see a placeholder image within the template that you can position and resize to the desired output size.
If you change the code of a image element after you have inserted the placeholder into the template, you need to remove the placeholder from the template and insert the image element again. Otherwise error messages will occur when creating the report document.