Spanish Total.js
Español
Documentación Para agentes de IA
Contenido

Vistas

Describe the data that reports can use with an SQL query and a list of fields.

.md Sitio web

Esta página aún no está traducida. Estás leyendo el original.

En esta página

A view tells Dashboard which data reports may use: an SQL query on your PostgreSQL database and one entry for each column that people can pick. You write views in the Views screen.

The Views screen with one view named Sales

Create a view

  1. Select Views in the bar on the left.
  2. Select Create. The View specification editor opens.
  3. Enter the view as JSON, then select SUBMIT.

This view reads a table of sales:

{
    "id": "sales",
    "name": "Sales",
    "sql": "SELECT region, product, amount, dtcreated FROM demo_sales",
    "fields": [
        { "column": "region", "name": "Region", "type": "string", "group": true },
        { "column": "product", "name": "Product", "type": "string", "group": true },
        { "output": "@", "column": "amount", "name": "Amount", "type": "number", "format": 2 },
        { "column": "dtcreated", "name": "Date", "type": "date", "group": true }
    ]
}

The view card appears in Views, and the view is ready to use in reports.

Edit or remove a view

Select the gear icon on the card of a view, then Edit or Remove. Removing a view also removes every report that uses it.

More about views

Views work as in OpenReports:

Hecho en Europa