Skip to main content

Report View

Configuration reference: Report

Overview​

The Report view generates a formatted document, as HTML or PDF, from a table's data. It can be built two independent ways: describe it to the AI assistant, which authors a self-contained HTML page, or design it manually in the block builder, which produces a PDF. A report can run over a whole collection (e.g., a price list) or bind to a single record (e.g., an invoice opened from a row).

Use it for printable or exportable documents (invoices, certificates, price lists, contracts), anything that needs a fixed layout rather than the flexible grid of a Table or Dashboard.

Saved report​

The Report view points to a saved report in the workspace, instead of carrying the content inside itself. The same report can be read by more than one view, and the list lives in Administration › Reports.

A report has:

  • Nome (name) and Tipo (type): Blocos (blocks) or HTML.
  • Entradas (inputs): what it receives. A record of a table is the main input (for example, the purchase to print); it can also receive several records or values (text, number, date, yes or no).
  • Fontes (sources): named sets of rows the content can read, each with a filter. For example, the lines of a purchase: compra = {{record.id}}. Each source reads up to 2000 rows.
  • Saídas (outputs): PDF, Imprimir (print), CSV and Email. Only the ones that are on appear on the document toolbar.
  • Parâmetros (parameters): the saved values of the value-type inputs, the starting point of Parâmetros in the view.

In blocks and text fields you can use:

PlaceholderResult
params.<name>The value of a value-type input
org.*Organization data, for example org.name
user.*Data about whoever opens the report, for example user.name
sources.<name>.countNumber of rows in the source
sources.<name>.sum:<column>Sum of the column; also avg, min and max

Choosing the report​

In Configurar, the Relatório card has:

  • The selector with the workspace's active reports (Nenhum (none) leaves the view with no report linked).
  • Novo relatório (new report): creates a report and links it to the view. It is not available if the table has no workspace; in that case the report is stored in the view.
  • With a report chosen, the type, scope and content fields disappear and the card shows the summary (inputs and outputs) and Abrir construtor (open builder, for block reports) or Editar HTML. Both edit the report itself.

The view's filters and facets still belong to the view.

Older views​

Views that already held their content inside themselves keep showing it as before. The first time you save them in Editar blocos, the content moves to a saved report and the view points to it. Anular (undo) on the confirmation notification restores the previous content.

Archived report​

If the linked report is archived, the view shows "O relatório ligado já não existe." (the linked report no longer exists) with the Configurar action, so you can pick another.

Printing from a record​

A report whose main input is a record appears in the context menu of that table's rows, in the table and list views, and under the Imprimir icon of the saved record's form. With several reports, you choose which. If the report has value inputs, a small dialog asks for them before generating, with the saved values as the starting point. The document opens with the buttons of the outputs that are on: Transferir, Imprimir, Transferir CSV and Email. On an HTML report, Transferir and Imprimir (with the PDF or Imprimir output on) generate the PDF on the server, A4 and in the light theme, on every platform; Email is for block reports only.

An automation button can also open a report: in the button's Configurar, Relatório section, choose the report; on click it opens with the row's record.

Download CSV​

With the CSV output on, Transferir CSV (download CSV) saves a file with one section per table in the document: the title, the headers and the rows, with a blank line between tables. Columns are separated by ;, so the file opens in Excel. Values come out as in the table, with numbers unformatted, ready for a spreadsheet. You do not need to generate the PDF first.

Body tables and sub-tables are included (sub-tables only when the document is for a single record). Tables inside a repeating block or a conditional block are left out, and so are totals and group rows. A report with no tables cannot turn the CSV output on.

Send by email​

With the Email output on, Email sends the generated PDF as an attachment, and it becomes active once you have generated the PDF. The Enviar por email (send by email) dialog has:

  • Para (to): filled from the column chosen in the report, when the document is for a record and the column holds addresses. Type an address and press Enter to add another.
  • Assunto (subject): the one set in the report; with none, it uses the report name and the record title.
  • Mensagem (message): the body of the email.

The placeholders in Assunto and Mensagem arrive already resolved, and you can change everything before Enviar (send). The email goes out through the server and appears in the organization's outbox as "Relatório" (report). The PDF must be 10 MB or smaller.

You need permission to add or edit records in the table. Without it, the button is disabled with the hint "Sem permissão para enviar" (no permission to send).

In an automation, the Gerar relatório (generate report) step produces the same PDF as Transferir without anyone opening the document, and the Enviar email (send email) step attaches it with "Attach run files". The step accepts both block and HTML reports, and it uses the row that fired the automation unless you set another record. The automation uses the report's own filter (the one you set when you created it), not the view's filters. The steps are in Workflows.

Parameters in the view​

When the report has value-type inputs, the view toolbar shows Parâmetros (parameters). The values you choose apply to this session and generate the document again; the ones saved in the report do not change. It works for both PDF and HTML.

The two report kinds​

A report view is either HTML or Native (PDF), set via the Tipo dropdown in the Conteúdo tab of the view configuration.

KindBuilt withRendered asBest for
HTML (AI) (default)AI assistant conversation, or hand-edited HTMLSandboxed, offline webview inside the viewFree-form documents where the AI decides structure and style
PDF (template)Block builder (A4 or Letter sheet)Generated PDF, previewed inside the viewStructured documents with a predictable layout, such as invoices and tabular reports

Switching Tipo does not discard the other kind's content. The HTML artifact with its data contract and the PDF template are stored independently, so switching back restores what was there.

Starting from the empty view​

A report without content offers two options:

  • Construir (Build): opens the block builder and produces a PDF.
  • Página livre com IA (Free page with AI): opens the AI assistant, which writes an HTML page.

Configurar (Configure) is not in the empty state: find it in the view's ⋮ menu.

Building with AI (HTML kind)​

From the empty state, or the AI icon in the toolbar, open Página livre com IA or Editar com IA. An in-view assistant opens:

  1. Describe the report in the chat (e.g., "projects table with a status filter and a total in the footer").
  2. The assistant generates a self-contained HTML document and a data contract, the queries it needs from this table (and others in the workspace), and shows a live preview rendered with real, current data.
  3. Keep iterating in the same conversation; each reply replaces the previous draft.
  4. Guardar saves the draft to the view; Descartar discards it (it asks for confirmation if there is unsaved work). A save can be undone with the Anular action on the confirmation notification.

The generated HTML is self-contained (inline CSS and JS, no external requests) and reads its data from window.OUTDO_DATA, injected from local data every time the view opens, so there is no need to regenerate to reflect new rows. A restrictive Content-Security-Policy blocks any network access from inside the document, and the artifact never writes back to OutDo.

You can also skip the AI and edit the artifact and the data contract directly: see Manual HTML configuration.

To create a new report from a request, as HTML or as blocks, use Criar com IA (Create with AI) in Administration › Reports.

Building with the block builder (PDF kind)​

The block builder opens an A4 or Letter sheet with three bands: Cabeçalho (header, repeats on every page), the body (flows and paginates) and Rodapé (footer, repeats on every page).

Block palette​

The palette has three groups. Drag a block onto the sheet, or click it to add a row.

GroupBlockPurpose
ConteúdoTextoStatic text or text with {{...}} placeholders, optionally styled as a heading
ConteúdoImagemA static image, such as a logo
ConteúdoVariávelOne expression shown as label: value (lookups, aggregates, formatters)
ConteúdoSeparadorA horizontal line
ConteúdoCódigo QRA QR code with a text, a column value or the record link
ConteúdoAssinaturaA signing space with a label and an optional date line
DadosTabelaA data table: columns, per-column width, alignment, format and total, grouping, alternating rows, highlighted header
DadosIndicadorOne value computed over the report rows
DadosGráficoBars, lines or pie over the report rows
DadosSub-tabelaThe rows a link column of the record points to
DadosImagem da colunaThe first image of an image or file column of the record
DadosRepetiçãoMaster-detail: loops over the rows of another table (with an optional filter) and draws a sub-layout per row
DadosCondicionalShows or hides its content depending on a condition
PáginaQuebra de páginaForces a page break

Bands and allowed blocks​

The header and the footer only accept Texto, Variável, Separador, Imagem, Indicador, Código QR and Assinatura. If you drop any other block in one of these bands, the builder refuses it and shows the message "Este bloco só sai no corpo" (this block only prints in the body). Tabela, Gráfico, Sub-tabela, Imagem da coluna, Repetição, Condicional and Quebra de página belong in the body.

Body blocks stack in rows; in the header and footer they can share a row, on a column grid.

Editing on the sheet​

  • Width: drag the block's right edge.
  • Body row height: drag the row's bottom edge; a double click returns to automatic height.
  • Duplicate: duplicates the block or the row (also with Ctrl/Cmd+D).
  • Margins: editable in the Página panel, next to the size (A4 or Letter) and orientation (portrait or landscape).
  • Undo and redo: keep up to 50 steps. Each structural edit, each burst of typing and each drag counts as one step.

Keyboard shortcuts (they do nothing while a text field has focus):

ShortcutAction
Delete or BackspaceRemoves the selected block
Ctrl/Cmd+DDuplicates the selected block
Ctrl/Cmd+ZUndo
Ctrl/Cmd+Shift+Z or Ctrl+YRedo
Left / RightMoves the selected block one position in its row

Table​

The default columns are the view's Table columns: hidden columns are left out and the order is the same. Each column has:

  • Formato (format): Como na tabela (as in the table), Número inteiro, Número com 2 casas, Moeda (€), Percentagem, Data, Data e hora or Sim ou não.
  • Total: Soma (sum), Média (average), Contagem de células preenchidas (count of filled cells), Mínimo or Máximo, computed over the stored values and printed at the end of the table.

The table also has Agrupar por (group by), which gathers the rows by a column, with a header and a subtotal per group; the «(sem valor)» group comes last. The table header repeats on every page. The Sem linhas (no rows) text shows when there is nothing to list.

Indicator, chart and other blocks​

  • Indicador: a single value over the report rows, with a label and a format.
  • Gráfico: Barras (bars), Linhas (lines) or Circular (pie). Categories group like the Table and the value is a Contagem (count) or an aggregate of a numeric column. A pie chart keeps the seven largest slices and folds the rest into an Outros (others) slice. It prints in the PDF as an image and uses the same rows as the preview, so the «Primeiras 50» limit applies too.
  • Sub-tabela: the rows the record's link column points to; it only works in Individual mode or inside a Repetição.
  • Imagem da coluna: the first image of an image or file column of the record, Inteira (whole) or Preencher (fill), with a maximum height; the same record rule applies. Images wider than 1200 px are scaled down before they enter the PDF.
  • Código QR: Origem (source) picks the content: Texto (any text or field), Valor de uma coluna (a column value) or Ligação do registo (record link), which opens the record in the app. The link works inside a Repetição (the iterated row) and in a single-record report; in a list, with no single record, the code is not drawn. It also has a size.
  • Assinatura: label, optional date line and height.

Inserting fields​

The Inserir campo (Insert field) menu offers, besides the table's fields:

  • Agregados (Aggregates): sum, average, minimum, maximum and count of the columns.
  • Documento (Document): the table name and today's date; Página (page) and Total de páginas (total pages) only work in the header and the footer.

Dates print in the workspace time zone. For select, linked select and user columns the document shows the name, never the internal id.

Preview with real data​

The builder shows the view's own rows, after the view's filters and the report filter. By default it shows the Primeiras 50 (first 50) rows; choose Todas (all) to see the full set. The same rows and the same labels feed the view's PDF.

Data mode and template filter​

The Dados mode is Lista (one document over all the filtered rows) or Individual (one document for one record: the bound row in the Por registo scope, or the first row of the filtered set in the Coleção scope). The template also has its own dataset filter, independent of the view's admin filters, that decides which rows feed the document. It opens in its own dialog.

Validation​

The Validação list flags problems in the template, for example an empty body, a column that no longer exists, an unknown field, an image without an address or a block in a band that does not accept it. The new blocks also warn about a missing column, a chart without categories or values, a sub-table without a link, a QR code without content, or a block that needs a record. Clicking a warning that refers to a block opens that block.

Saving​

The builder saves where the view reads: the rail's own configuration when the rail uses one, otherwise the global view. This is the same target as Configurar, and the Guardar neste rail button says so. The confirmation notification includes Anular, which undoes the save and confirms that the change was undone.

PDF in the view​

Once a template exists, the view shows the report as a PDF preview, generated with Gerar PDF. After it has been generated, the PDF refreshes by itself when the data changes. Transferir saves the file and Imprimir opens the system print dialog. Editar blocos reopens the builder on the same template. On narrow screens the toolbar is compact.

On a saved report, the toolbar shows only the buttons for the outputs that are on: Transferir (PDF), Imprimir, Transferir CSV and Email. Older views, with the content inside themselves, keep Transferir and Imprimir and have no CSV or Email.

Scope: collection vs record​

Set via Âmbito in the Conteúdo tab:

ScopeBehavior
Coleção (default)The report runs over the view's full (filtered) row set
Por registoThe report is bound to exactly one row. HTML templates read it via $current.<column>. PDF templates expose it as record.<field>, stable anywhere in the document, including inside repeating blocks, while row.<field> is the current row: the bound record itself outside a repeating block, or each iterated child row inside one. Typically opened by embedding the report view inside a Linked View on a form, which supplies the bound row

A record-scoped report opened without a bound row shows the notice "Este documento é por registo: abre-o a partir de uma linha" (this document is per record: open it from a row). In the view configurator's own preview, the table's first row is used as sample data.

Filters​

Two independent layers, same as Table/Kanban:

  • Base filters (Filtros tab, admin): a filter group applied automatically before the report renders.
  • Filters (toolbar, per user): an additional filter each user applies on top of the admin's, persisted per user. Collection scope only.

Facets​

In collection scope, the facet panel lets you narrow the data by discrete column values, as in Table/Kanban. It opens from Painel de filtros (filter panel) in the ⋮ menu and docks on the right; below 600 px it opens as a sheet from the bottom. Escape closes it.

Supported column types: text, select, linked select, checkbox, number, date and status. Date columns have Year, Month, Day navigation with per-value counts. Facet selections combine with the admin and user filters.

Manual HTML configuration​

For the HTML kind, the Conteúdo tab also exposes the raw fields the AI writes to, for manual editing or for pasting an artifact from elsewhere:

  • Artefacto HTML (self-contained): the complete HTML document. Include a <head>, which is the injection point for the data and the theme CSS.
  • Data contract (JSON): declares the named queries the document reads, e.g. {"queries":[{"name":"...","feature":"$f_<feature>"}]}. Each query can restrict columns, apply row filters and cap the row count with limit.

Toolbar​

ActionAvailability
ParâmetrosSaved report with value-type inputs: asks for the values for this session
Transferir CSVPDF kind, with the CSV output on and at least one table in the body
EmailPDF kind, with the Email output on; active once you have generated the PDF
Transferir / ImprimirHTML kind, with content: generate the PDF on the server (A4, light theme) on every platform. On a saved report, they need the PDF or Imprimir output
Editar com IAHTML kind, when not already in edit mode
FiltrarCollection scope only: opens the per-user filter, with a badge showing the active count
ConfigurarIn the ⋮ menu: opens the full configuration (Filtros and Conteúdo tabs)

Tips​

  • A report without content offers Construir and Página livre com IA; pick whichever fits.
  • Facets and the per-user filter only apply in collection scope; a record-scoped report always shows just the bound row.
  • If the builder refuses a block in the header or footer, drop it in the body.
  • A saved configuration that cannot be read shows "Configuração inválida": reopen Configurar and save again to recover.