Word reports

Word Reports

A Word report turns one questionnaire result into a finished document — a certificate, an inspection report, a visit summary — using a .docx file the user designs in Word as the template. The template is a normal Word document with placeholders written in curly braces; when the report is generated, each placeholder is replaced by the answer to the question with that name, including photos and voice note texts.

There are two steps:

  1. Upload the template on the Reports page (Survey report), where the document is stored and linked to a questionnaire.
  2. Generate the report on the Survey data report page, where a result is picked from the grid and the document is produced as a Word or PDF file.

Because the template is an ordinary Word document, everything around the placeholders — headings, logos, tables, fonts, colours — stays exactly as the user designed it. Only the placeholders are replaced.

 

The placeholders

A placeholder is the question name from the questionnaire, written in curly braces exactly as it appears in the questionnaire designer. The placeholders available for a template are detected automatically when the report is generated, so any question can be used — the name is all that matters.

Placeholder Inserts
{questionName} The answer to the question, as text. Dropdowns show their display value; multi-choice answers are joined with commas; dates and numbers appear as captured. For matrix questions, address one cell as {matrixName_rowName} or {matrixName_rowName_columnName}.
{%photoQuestionName} The image captured by a photo question, embedded in the document at its original size. For an image zoom question, this inserts the cropped selected region the user marked.
{%photoQuestionName|maxSize:250} The same image, capped at 250 pixels wide — the height follows automatically so the picture keeps its proportions. Use this to stop large photos from overflowing the page.
{%photoQuestionName|maxSize:200:200} The image at an exact size, width 200 pixels by height 200 pixels. The picture is forced into that box — use it for fixed-size slots such as ID photos or thumbnails in a table.
{%!imagezoomQuestionName} The full image of an image zoom question, with the region the user selected drawn on it as a red dashed marker — instead of the crop that {%name} produces. Useful when the reader needs the whole photo with the finding pointed out.
{%!imagezoomQuestionName|maxSize:250} The full marked image, capped at 250 pixels wide. The maxSize option works the same way on ! tags as on normal image tags.
{voicenoteQuestion_transcription} The transcription of a voice note answer — the spoken text, written out.
{voicenoteQuestion_translation} The translation of the voice note.
{voicenoteQuestion_llm} The AI report generated from the voice note — the structured write-up the assistant produced from what was said.
{voicenoteQuestion_lll} The second generated report stored for the voice note, when one was produced.

A few rules when writing placeholders:

  • The name must match the question name exactly — it is case sensitive and spaces are not allowed, so copy the name from the questionnaire designer rather than typing it from memory.
  • The % marks an image placeholder: use it only on photo and image zoom questions. A plain {photo} without % would print the raw value instead of the picture.
  • The ! variant only works on image zoom questions; on any other question type it produces nothing.
  • A question that has no answer inserts an empty value. In tables, the report can drop rows whose placeholders all resolved empty, so optional sections do not leave blank rows behind.

 

Repeating rows — matrixdynamic and paneldynamic

Questions that collect a list of entries — a dynamic matrix or a dynamic panel — use a loop: a pair of opening and closing markers around the content that should repeat once per entry.

{#breakdownslisting}{Equipment}	{%PictureBreakdown|maxSize:200:200}{/breakdownslisting}
  • {#breakdownslisting} opens the loop and {/breakdownslisting} closes it. For a matrixdynamic question the loop name is the question's value name (the name its rows are stored under), which may differ from the question name — copy it from the question's settings in the designer.
  • Everything between the markers is repeated once per matrix row. Inside the loop, the placeholders refer to that row's columns: {Equipment} prints the row's Equipment value and {%PictureBreakdown|maxSize:200:200} embeds the row's photo at exactly 200×200 pixels — image placeholders and the maxSize option work inside loops exactly as outside.
  • A row with no entries simply produces nothing between the markers.

The same loop works for a paneldynamic question — here the loop name is the panel's question name, and the placeholders inside refer to the questions inside the panel:

{#defects}{Description}	{%Photo|maxSize:250}{/defects}

Each panel entry repeats the enclosed content with its own answers, including photos captured inside the panel.

Loops are most useful inside a table: put the markers around a table row and the row repeats per entry, giving one line per matrix row or panel entry. In templates where the markers must sit inside a row, the form {-w:tr breakdownslisting} ... {/breakdownslisting} repeats the enclosing table row directly.

 

Uploading a template

Templates are managed on the Reports page. The Upload new report area at the top accepts a Word document by drag & drop or through the Select file button — .doc and .docx files up to 10 MB.

Once a file is chosen, the page asks for:

  1. Report name — required. This is the name users see when selecting the report, so make it descriptive, such as Visit certificate or Inspection report v2.
  2. Description — optional. A short note shown under the name in the list, for example what the report is for or which placeholders it uses.
  3. Questionnaire — the questionnaire the template belongs to. The placeholders are resolved against this questionnaire's answers, so the template only appears for results of that questionnaire.

Press Upload Report to save it. The Saved reports table below lists every template with its name, survey, questionnaire, file size and upload date. The download icon fetches the original document again — handy for editing a template: download, change it in Word, upload the new version. The delete icon removes a template after a confirmation prompt.

 

Generating a report

Reports are produced on the Survey data report page, on the Word tab:

  1. Pick the template in the Select report dropdown — it lists each saved report with its survey and questionnaire. The grid underneath then shows the results of that questionnaire.
  2. Select the result the report is about — the answers of that one row fill the placeholders.
  3. Press the Word report button to download the filled document, or the PDF report button for a PDF version.

The generated file is named after the report template. Every placeholder is replaced by the selected result's answers: text answers print as text, photos embed at the size set by maxSize, image zoom pictures come out cropped or marked depending on the ! prefix, and voice note placeholders print their transcription, translation or generated report text.

The same templates also drive the scheduled Word-PDF report type, which emails a generated document for each matching result on a schedule — so a template tested here behaves identically when it runs automatically.

 

Basic examples

Example 1: a visit report with photos

Field staff capture visit reports with a questionnaire containing a date, a reporter name, notes and two photo questions. A one-page Word template should show the details and the two photos side by side.

  1. In Word, lay out the report: a title, a two-column table for Date and Reporter, a paragraph for the notes, and a two-cell table for the photos.
  2. Type the placeholders where the values belong: {visitDate}, {reporterName}, {notes}, and in the two photo cells {%photo1|maxSize:300} and {%photo2|maxSize:300} so the pictures fit the page.
  3. Save the file as .docx, then upload it on the Reports page with the name Visit report and the visit questionnaire selected.
  4. On the Survey data report page's Word tab, select Visit report, pick a result in the grid, and press Word report. The document arrives with the answers filled in and the photos embedded at 300 pixels wide.

Example 2: an image zoom question, crop and overview

Inspectors photograph a large board and mark the area of interest with an image zoom question. The report should show the marked detail up close and the full board with the selection visible.

  1. Add {%boardPhoto|maxSize:400} where the detail belongs — it inserts the cropped region the inspector selected.
  2. Add {%!boardPhoto|maxSize:400} where the overview belongs — it inserts the complete photo with the selected region marked by a red dashed box.

Same question, two placeholders: {%name} shows what was marked, {%!name} shows where it sits.

Example 3: including a voice note

Reporters record a voice note instead of typing. The report should print what was said plus the generated summary.

  1. Where the spoken text belongs, put {fieldnotes_transcription}; where the translation belongs, {fieldnotes_translation}.
  2. Where the AI write-up belongs, put {fieldnotes_llm}.
  3. Generate the report for a result that has a voice note: the placeholders print the corresponding texts; for a result without one they stay empty.

© Denkami 2026 | 18 Kapumpe Rd, Lusaka, Zambia | +260 962 401 869 | admin@denkami.com