Expressions and functions
The safe expression language: fields, arithmetic, conditions, sum, count, avg, page subtotals, running totals, date and string functions.
Fields, visibility rules, filters and text templates use a small, safe expression language: arithmetic, comparisons, && || ! ?? and ?:, member access (customer.name, items[0]) and the functions below. It has no access to globals and cannot assign. In text, write expressions in braces with an optional format after a colon: "{sum(amount):#,##0}원".
price * qty arithmetic
amount >= params.minAmount comparison with a parameter
customer.name ?? '(미지정)' member access and fallback
qty > 10 ? '대량' : '일반' condition
sum(amount) aggregate over the band's scope
sum(amount, 'page') page subtotal
sum(amount) / sum(amount, 'report') share of the grand total
format(date, 'yyyy년 M월 d일 (ddd)') 2026년 10월 15일 (목)
koreanAmount(1230000) 일금 일백이십삼만원정
bizNo('7928703276') 792-87-03276
{page} / {pages} page x / y in a text templateVariables
| Name | Type | Description |
|---|---|---|
page, pages | number | Page number and page count (per group with resetPageNumber). |
rowNum | number | Row number within the group (or report). |
rowIndex | number | Row number within the report. |
groupKey, groupLevel | unknown, number | Current group value and depth. |
now | Date | Time the report was laid out. |
params | object | Parameter values: params.from. |
row, rows, allRows, data | object, array | Current row, rows in scope, all rows, the whole data object. |
Aggregates and scopes
The scope is the second argument: 'group' (the current group), 'page' (rows on the current page — page subtotals) or 'report' (every row). Without it, aggregates use the band's natural scope: the group in group bands, the page in page bands, the whole report elsewhere.
| Name | Type | Description |
|---|---|---|
sum(expr, scope?) | number | Sum over the scope. |
avg / min / max(expr, scope?) | number | Average, minimum, maximum. |
count(expr?, scope?) | number | Rows (or non-empty values). |
distinct(expr, scope?) | number | Number of different values. |
first / last(expr, scope?) | unknown | Value of the first / last row. |
runningSum(expr, scope?) | number | Sum up to and including the current row (default scope report). |
Functions
| Name | Type | Description |
|---|---|---|
format(v, f) | string | Format a number or date: format(date, "yyyy-MM-dd"). |
koreanAmount(n) / korean(n) | string | 1230000 → 일금 일백이십삼만원정. |
bizNo(v), phone(v) | string | 1234567890 → 123-45-67890; 0212345678 → 02-1234-5678. |
round / floor / ceil(v, digits?) | number | Rounding to digits after the point. |
abs, number, string | — | Conversions. |
upper, lower, trim, len, left, right, substr, replace, concat, padStart, join | string | Text functions. |
iif(c, a, b), coalesce(...), isEmpty(v) | — | Conditions and fallbacks (?: and ?? work too). |
date, today, now, year, month, day, addDays, dateDiff, ymd | — | Dates. |
groupSum(rows, key, value), groupCount(rows, key) | array | Totals per key, handy as a chart source. |
min2(a, b), max2(a, b) | number | Smaller / larger of two values. |