Inside the engine

ERD Report Server is the same pipeline with one HTTP route in front of it. Under the container is one C++ renderer in five stages, each a pure function of the one before it, with no interpreter, no runtime and no state carried between one request and the next. Everything on this page follows from that: the same bytes on every machine, refusals that name their cause, and a template language small enough to read in an afternoon.

The render, stage by stage

  1. Parse and validate the template

    The template is checked against the schema before anything is laid out. An unknown member, a wrong type or a missing target is refused at that member's own pointer — never repaired in silence.

  2. Validate the data

    A record that breaks the schema the template declares is refused before a page exists, so a report cannot print half a data set.

  3. Lay out and paginate

    Two passes. The first evaluates only the data source and the group keys, so the page count is real before any display binding is resolved — which is how “Page 1 of 7” prints a 7. The second resolves everything else.

  4. Resolve fonts and images

    Assets come from the resources directory your host publishes, fonts from the fonts directory it names; every other path and URL is denied.

  5. Draw, then write

    The overflow check runs before any page sink opens, and the first page is written only after every page has rendered. A template that fails on its last page never leaves a partial document.

One instant, one answer:

A document has a single print instant. The render request can supply it; otherwise the host clock is read once before layout, and every page, every expression and both layout passes read that same value. A timestamp in the header and one in the footer can never differ by a millisecond, and re-rendering last year's invoice prints last year's date. Pin the instant and the same template and data produce the same bytes on any machine, today or in five years.

EREL, the expression language

Small by subtraction

Bindings, visibility rules, group keys, styles, chart values and barcode values are EREL expressions. The grammar has no assignment, no loops, no user-defined functions, no object literals and no closures — so evaluation always terminates, costs a bounded amount per binding, and cannot reach the host. A template is a document to review, not code to trust.

Deterministic to the byte

String functions are byte-exact rather than locale-aware: upper('café') is 'CAFé', and trim removes exactly four characters. The browser designer and the native engine are two independent implementations that must return the same value or the same diagnostic for every expression, and a shared conformance corpus pins both.

An expression, not a script

{
  "pages": [{
    "bands": [{
      "kind": "detail",
      "elements": [
        { "kind": "text", "x": 0, "y": 0, "width": 300, "height": 18,
          "expression": "concat('Invoice ', invoice.number, ' · ', customer.name)" },
        { "kind": "text", "x": 380, "y": 0, "width": 120, "height": 18, "align": "right",
          "expression": "summary.sum(lines.amount)" }
      ]
    }]
  }]
}

What the engine refuses, and why

RefusalWhat it means for you
A URL or a file path in a templateAssets resolve only from the resources directory your host publishes. A template cannot make the renderer read a file or fetch a page.
Content that leaves its frameThe overflow verdict is reached before a page is written, so an overlapping footer is a refusal with a message, not a surprise in the PDF.
A font that is not thereThe render fails and names the face instead of substituting one. The machine's own fonts are never read, so two hosts with the same font directory agree to the byte.
A data graph past the limitThe request is bounded at one million values and 512 levels of nesting, so a runaway join is refused before it becomes a memory incident.
A page range that matches nothingA page range that names no page of the document is an error, not an empty file.

What that buys you

The same bytes everywhere

A fully static binary with its own fonts: no interpreter, no shared libraries and no host fonts to differ between machines.

Refusals that name their stage

Template, data, assets, drawing — each stage refuses in its own vocabulary, and the exit code names the class before you read a word.

Nothing to restart

One process per render, no cache and no shared state: a failed render is a result, not a service that needs attention.

One page, every format

The PDF, the Word file, the workbook, the web page, the label job and the receipt are all written from the same laid-out page.

Depth where it matters

Ten chart kinds

Bar, stacked, percent-stacked, combo, line, area, scatter, pie, donut and gauge — native chart parts in Word and Excel, vectors in the PDF.

Text for every script

HarfBuzz shaping and UAX #9 bidirectional text for Arabic, Hebrew and other complex scripts, with 130 font families shipped with the engine.

Reports, not forms

Report, page, group and detail bands, running totals, subreports, multi-column layouts, cross-tabs, a table of contents and bookmarks.

Accessibility built in

PDF/UA-1 and PDF/A-2a tag headings, table header cells, figures with alternative text and a reading order that follows the page.

Engine questions

Is the output really identical on two machines?

Yes, and it is a property of the design rather than a promise: a static binary, no interpreter, no host fonts, one print instant, and string functions that never consult a locale table. Same template, same data, same request — same bytes.

Is a template code?

No. It is JSON: pages, bands, elements and EREL bindings. EREL has no assignment, no loops, no functions of your own and no access to the host, so a template can only describe a document. That is why it can be stored, diffed and reviewed like any other file.

Can a template read a file or call an API?

No. Every permission is denied by default: no URLs, no filesystem paths. A template reaches its own embedded data URIs and the regular files in the resources directory your host passes in the request.

Why does a missing font stop the render?

Because a substituted face is a different document. The engine never reads the fonts installed on the machine, so a missing family is one deployment error you fix once — not a difference between two hosts that nobody notices until an audit.

Do PDF, Word, Excel and HTML come from the same layout?

Yes. The document is laid out and paginated once, and each writer serialises that laid-out page. That is why the Word file opens with the same page breaks, the workbook's charts match the PDF's, and a label proof matches the print dot for dot.

What happens to a template that fails on page 40 of 40?

Nothing is written. Every page renders before the first byte of the document is written, so a failure at the end leaves no truncated file for a customer to open.

Put it on your own data

The Free edition is the same engine with every format enabled: no watermark, no render limit and no time limit. Build the proof of concept first, and decide about a licence when it works.

Request a licence

Frequently asked questions

What is EREL?

EREL — the ERD Reporting Expression Language — is the small, safe language a template uses wherever a value has to be worked out: an element binding, a visibility rule, a group key, a formatting rule, a chart series, a barcode value.

It is deliberately closed. There are literals, references to the data and to the report, member access, a fixed set of built-in functions such as format.currency, concat and count, and the usual arithmetic, comparison, logical and conditional operators. There is no input or output, no loop, no user-defined function and no way to reach the host, so a template stays data and never becomes code.

The designer and the engine each implement EREL, and both have to produce the same value — or the same diagnostic — for every valid expression. That is why a template looks the same in the designer, in ERD Report Cloud and in the document ERD Report Server answers with.

What is a template?

A template is a JSON document (format erd-report-template, templateVersion 1): pages measured in points, each holding elements with a fixed frame and optional repeating bands, with an EREL expression wherever a value comes from the data. It can carry a dataSchema that says which data it expects, and images are embedded as data URIs — a URL or a file path in a template is never fetched.

The designer exports it, and that document is what you POST to the container: the request body is the same one erd-report-render reads on standard input — the manifest line, then the template, the data and any report or password sections. The server keeps no template store, so every request carries the template it should draw.

Search all ERD Report Server help topics