Getting Started
- What is TestInvite?
- Build Your First Test
- Run Your First Assessment
- Taking the Assessment
- Viewing the Results
- Question Bank Overview
- Common Question Features
- Scoring
- Question Types
- Question Authoring
- Browsing Questions
- Content Blocks
- Media Library
- Metadata Rules & Schema
- Tests Overview
- My Tests
- Creating a Test
- The Test Editor
- Test Settings
- Sections & Pages
- Adding Questions
- Page Builders
- Test Profile
- Reporting
- Test Papers
- Analytics
- Publishing a Test
- Test Library
- Marketplace
- Tasks Overview
- Creating a Task
- Task Dashboard
- Steps
- Task Settings
- Candidates
- Test Sessions
- Sent Mails
- Proctoring
- Analytics
- Analytics Overview
- Test Analytics
- Question Analytics
- Per-Question Analytics
- Results Explorer
- Segment Analysis
Tests
Custom Reports
Custom Report Troubleshooting
A handler missing from the Handler list has a different Test ID; "Unexpected token" means object spread, ?. or ??; blank values are misspelled or missing variables; a page that splits in the PDF has content taller than A4.
Published 2026/10/15
Most problems show up in the handler editor: Output: Data shows what the function returned and Output: Report shows the rendered HTML. Test with several saved sample inputs before looking further.
Setup
| Symptom | Cause | Fix |
|---|---|---|
| The handler is not in the custom report's Handler list. | The handler's Test ID is not this test's ID. | Set the handler's Test ID to the test's ID. |
| The custom report is not offered in a step. | The step lists the custom reports of the test it delivers. | Create the custom report on that test (Reporting › Template). |
Function errors
| Message | Cause | Fix |
|---|---|---|
| The code must have only a single Function Declaration | Helper functions or other code outside anonymous. | Move helpers inside anonymous. |
| Function's name must be 'anonymous' / The code is not a Function Declaration | A differently named function, or const f = (data) => …. | Use function anonymous(data) { … }. |
| Function cannot be async | async function anonymous. | Remove async; the function must be synchronous. |
| Unexpected token ... / . / ? | Object spread, ?. or ??. | See Supported syntax. |
| … could not be cloned | The returned object contains a function or class instance. | Return plain data only. |
| Script execution timed out | A loop that never ends, or very heavy work. | Simplify; each run is limited to 5 seconds. |
| Cannot read properties of undefined | A field that may be missing (result, ticket, normy, testReporting) was not guarded. | Check it first: data.normy && data.normy.normativeResult. |
Template output
| Symptom | Cause | Fix |
|---|---|---|
| HTML tags show as text. | Output is escaped by default. | Use | safe for HTML you wrote — never for candidate text. |
| A value is blank. | A misspelled variable or missing data — missing values print as empty. | Compare the name with Output: Data; add | default("—"). |
| Percentile or sten is empty in some places. | The delivery has no benchmark, or the output doesn't include one. | Guard data.normy and show a fallback. |
| Pass/fail or level differs from the Standard report. | Unrounded percentage, or the pass mark read as a percentage. | Round the percentage; pass.min.score is 0–1. See Recipes. |
| The app's styles look different inside the report. | The report is isolated and inherits nothing. | Declare fonts and base styles in the template. |
Print and PDF
| Symptom | Cause | Fix |
|---|---|---|
| A page splits across two sheets in the PDF, or is cut off in Print. | The page's content is taller than A4 — often only for some candidates (longer name or band text). | Test the longest content and leave spare room. See Print & PDF Layout. |
| An empty last page. | A page break after the last page, or min-height in print. | Use .ti-page:not(:last-child) for breaks and unset min-height in print. |
| Fonts in the PDF differ from the screen. | The font is not loaded inside the template. | @import the font in the template's <style>. |
| Background colours are missing in print. | Browsers drop backgrounds when printing. | Add print-color-adjust: exact. |
| Images are missing in the PDF. | Relative or private image URLs. | Use public absolute https:// URLs. |