There are a number of placeholders that can be used within report templates. These include global variables and functions, and various data types.
Global Variables
Name
Type
Description
static_data
dict
Contains the static data specified in the Static Data tab of the report template editor.
folder
Folder
Contains data related to the folder this report is being rendered for.
case
Folder
Alias of folder.
snapshots
dict{string: Snapshot[]}
Snapshots selected by the report generator, grouped by snapshot container. Keys in the dict are the template names specified in the snapshot containers section of the report template editor.
report_signed_by
Signer
The signer of the report (if it is signed).
report_signed_at
datetime
When the report was signed (if it was signed).
Global Functions
Name
Description
template_file_by_name(name)
Get a URL to the file contents of a Report Template File by specifying its name.
The name of the report template file (must be exact).
id
string
The id (10 character alphanumeric) of the report template file.
Data Types
Some commonly used properties for folders, images, attachments and snapshots are listed.
Some properties are omitted for brevity. The pprint filter in Jinja is useful for exploring the available properties in each variable.
Folder Properties
Name
Type
Description
id
int
The ID of the folder.
name
string
The name of the folder.
description
string
The description of the folder.
attachments
Attachment[]
A list of attachments in the folder (i.e. non-image files).
images
Image[]
A list of images in the folder.
fields
dict
A dictionary mapping custom field names to custom field values.
Attachment Properties
Name
Type
Description
id
string
The ID of the file.
name
string
The name of the file.
file_url
string
A URL to access the contents of the file.
filesize
int
The size of the file in bytes.
Image Properties
Name
Type
Description
id
string
The ID of the image.
name
string
The name of the image.
filesize
int
The size of the image in bytes.
get_thumbnail(bounds)
function
Get a URL to access the thumbnail of the image.
get_region(area, bounds)
function
Get a URL to access a region from the image.
get_label(bounds)
function
Get a URL to access the slide label from the image.
Parameters
Name
Type
Description
area
int[]
A region to extract from the image specified as [x, y, width, height] in pixel coordinates of the original image. If omitted or invalid, the requested image is omitted from the report.
bounds
int[]
A [width, height] pair in pixels that this image will be resized to fit within (if larger). If omitted, the requested image is returned unscaled and if invalid, the requested image is omitted from the report.
Snapshot Properties
Name
Type
Description
id
int
The ID of the snapshot.
title
string
The title of the snapshot.
description
string
The description of the snapshot.
bounds()
function
Get a URL to access the snapshot’s region image.
Signer Properties
Name
Type
Description
name
string
The name of the user that signed the report.
signature
string
A URL to the signature image of the report signer.