Skip to main content
This page is a complete reference for all template tags, filters, and operators available in Reporter. For an introduction to templates and placeholders, see What is Reporter.

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.
Example:
count_by — Counts the number of items in a collection.
Example:
avg_by — Calculates the average of numeric values in a field.
min_by — Finds the minimum numeric value in a field.
max_by — Finds the maximum numeric value in a field.
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 formatted according to the provided format string. Time is generated in UTC.
Format codes: Examples:

Arithmetic tag

calc — Evaluates mathematical expressions with support for variables from the template context.
Supported operators: 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.
The result is a list of items — the latest one per group — stored in a variable you can iterate over. Each element is the original collection record, so you access its own fields:
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.
counter_show — Displays the sum of one or more named counters.
Example:

Filters reference


percent_of

Calculates the percentage of a value relative to a total. Returns a formatted string with 2 decimal places.
Example: if category.amount = "6.00" and total.expenses = "20.00":

strip_zeros

Removes trailing zeros from a numeric value without rounding.
Examples:

slice

Extracts a substring using start and end indices (0-based).
Examples:

replace

Replaces all occurrences of a search string with a replacement string. Format: "search:replacement".
Examples:

where

Filters an array of objects by field equality. Supports nested fields via dot notation.
Examples:
Use inside loops:

sum (filter)

Sums numeric values from a field across all items in an array. Uses decimal precision.
Examples:

count (filter)

Counts elements in an array where a field matches a value. Supports nested fields.
Examples:

contains

Checks if one value is partially included in another. Useful when data includes dynamic prefixes or suffixes.
Example:
  • Source: 0#@external/BRL
  • Target: @external/BRL
Returns 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):
Multi-schema (explicit schema.table key):
Supported operators: