Dynamic images in HTML templates
Displaying images in HTML mail merge templates.
1. Access the business object Properties for which you want to include images dynamically and click Report on the action menu.
2. In the Reporting window that appears, click Add on the action menu to add a new report.
The Report definitions and settings window opens.
3. In Settings, in the Type field, select Mail merge.
4. In the Selected fields section, click Add expression to add an expression.
5. In the Expression builder, in the Expression panel type:
"<img src='" + Properties.Image + "'alt='" + Properties.Name + "'/>"
and click Check.
The Information window appears informing you that the expression is approved.
6. Click Exit to close the Information window.
7. Click OK to close the Expression builder window.
8. In the Report definitions and settings window, in the Merge code field, type PROPERTYIMAGE.
| Ensure that the Image field on Properties contains an image. |
9. In the Selected fields, click Properties and select the HTML code template from Settings > Template.
10. Open the HTML template, add:
<PROPERTYIMAGE>
11. Save and close the HTML template.
12. In the Report definitions and settings window, click OK and preview / print the report.