Report Templates Overview [addon]

Report templates may be used to generate standardized PDF outputs for summarizing the information in a folder. Reports may include the signature of the user that generated them and are automatically saved in the folder where they are generated. Report templates provide a convenient mechanism for arching and/or sharing study information in standard formats. Different report templates can be used for different studies, depending on the need.

Developing templates

Developing templates requires understanding of HTML and CSS. If you don’t have the required expertise and are not willing to experiment, contact our support team for information on how we may be able to support you.

The style and layout of the data in a template can be fully customized with standard HTML and CSS, similar to how web pages are formatted. Additionally, placeholders can be used within templates for populating metadata, snapshots, image thumbnails, hyperlinks, as well as other static data (e.g. text and images) throughout the template. During report generation, these placeholders are populated with data from the folder in which the report is generated. The output of the reporting engine is a PDF that has been formatted and populated according to the template that has been used.

To better understand the features of the templating language, start by reviewing our [Jinja2 Quick Reference] and [Placeholder Reference]. For comprehensive information about templating language, refer to documentation of the Jinja2 templating language.

A basic template

The following example demonstrates a trivial example of a template that outputs the list of images in a folder. To learn more about the syntax and possibilities, see the following pages for more details: [Jinja2 Quick Reference], [Placeholder Reference] and [Auxiliary Information].

{# Section for report title #}
{% block title %}
{# Set the title of your PDF document in this block (text only) #}
{% endblock %}
{# Section for report body #}
{% block body %}
<div class="container">
<h1>Basic Report Template</h1>
<p>Set the content of your report within the "body" block.</p>
<p>Use variables passed to the template like this:</p>
<p>The name of the folder is {{ folder.name }}.</p>
<h2>List of Images</h2>
<ul>
{% for image in folder.images %}
<li>
{{ image.name }} ({{ image.filesize | filesizeformat }})
</li>
{% endfor %}
</ul>
</div>
{% endblock %}