Building templates
Common blocks
- Loop
- Loop with explicit schema
- Simple condition
- Temporary scope
- Value formatting
Conditional blocks
Tags reference
Aggregation tags
sum_by — Sums numeric values from a field across all items in a collection.All aggregation tags use decimal precision to avoid floating-point rounding errors. Missing or non-numeric fields are skipped. Returns
0 if no items match.Date and time tag
date_time — Outputs the current date and time in the Reporter runtime’s local time zone, formatted according to the provided format string.
Examples:
Arithmetic tag
calc — Evaluates mathematical expressions with support for variables from the template context.
Examples:
Variables that cannot be resolved default to
0. Division by zero produces an error.Grouped selection tag
last_item_by_group — Groups items by a field and selects the most recent item per group, ordered by a date field (descending). Optionally filters items first. Useful for regulatory reports that require the latest record per account grouped by category.group_by accepts a comma-separated list of fields for composite grouping. Maximum collection size: 100,000 items. Results are sorted by the group_by value for deterministic output.Counter tags
counter — Increments a named counter by 1. Produces no output. Counters are scoped per render.Filters reference
percent_of
Calculates the percentage of a value relative to a total. Returns a formatted string with 2 decimal places.category.amount = "6.00" and total.expenses = "20.00":
strip_zeros
Removes trailing zeros from a numeric value without rounding.decimal
Prints a number with a fixed number of decimal places, from 0 to 18.rjust, ljust, or center can follow decimal in the same expression. Reporter refuses a template that uses decimal inside a {% %} tag.
slice
Extracts a substring using start and end indices (0-based).replace
Replaces all occurrences of a search string with a replacement string. Format:"search:replacement".
where
Filters an array of objects by field equality. Supports nested fields via dot notation.sum (filter)
Sums numeric values from a field across all items in an array. Uses decimal precision.count (filter)
Counts elements in an array where a field matches a value. Supports nested fields.add_day
Adds adia field to each row of a list. The value is the day of the named date field, as a number in YYYYMMDD form. Use it to group or compare rows by day.
add_signed
Adds asigned field to each row of a list. The value is the named amount, negative when the row’s direction is debit. Use it to sum a net balance.
filter (function)
Returns the rows of a list whose field equals a value.contains
Checks if one value is partially included in another, ignoring case. Useful when data includes dynamic prefixes or suffixes.- Source:
0#@external/BRL - Target:
@external/BRL
true because @external/BRL exists within the source value.
Operators and filters summary
Advanced filtering
When generating a report, you can pass filters in the request body to narrow the data. Filters follow a structure of datasource > table > field: Single schema (default):

