> ## Documentation Index
> Fetch the complete documentation index at: https://docs.lerian.studio/llms.txt
> Use this file to discover all available pages before exploring further.

# Generate a Report

> Generate a regulatory Report through a 4-step wizard that guides you from Template selection to the final compiled output.

Use this page to generate a Report from an existing Template. Generation is the moment Reporter applies a Template to data and creates a file that can be monitored, viewed, and downloaded.

## Objective

***

Create a generated Report for a specific operational need, period, entity, status, or submission.

For example, generate a monthly CSV for May transactions, an XML file for a regulatory submission, or a PDF summary filtered to one customer segment.

## When to use

***

Use this task when:

* the Template is ready;
* the Data Source used by the Template is available. It may be an internal source already configured for the environment or an external source added from **Data Sources**;
* an operator needs to produce a Report file;
* the Report needs optional filters, such as date range, status, type, or entity.

Do not use this task to change the Template structure. Update the Template first, then generate a new Report.

## Before you start

***

Confirm:

* the selected Template is the correct one for the obligation;
* the Template output format matches the file you need to deliver;
* the Data Source used by the Template is available and tested when the report depends on a connection that may have changed;
* you know whether the Report should include all data or a filtered subset;
* the filter values are precise enough for the reporting period.

<Note>
  Reports are generated asynchronously. A new Report starts in `Processing` and only becomes available for download when it reaches `Finished`.
</Note>

## Step by step

***

<Steps>
  <Step title="Open the Reports page">
    Go to **Reports** and click **New Report**.
  </Step>

  <Step title="Select the Template">
    In the **Template** step, choose the Template that defines the output structure and format. Click **Next**.
  </Step>

  <Step title="Add filters when needed">
    In the **Filters** step, add one or more filters to narrow the data. This step is optional. If the Report should include all available data, click **Next**.
  </Step>

  <Step title="Review the setup">
    In the **Review** step, check the selected Template and applied filters.
  </Step>

  <Step title="Generate the Report">
    Click **Generate Report**. The wizard shows generation progress and closes after the request is submitted.
  </Step>

  <Step title="Monitor the status">
    The Report appears in the list with `Processing` status. Wait until it reaches `Finished` before downloading.
  </Step>
</Steps>

## Field guide

***

| Field            | What to enter                                                                                                                                             | Example                  |
| ---------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------ |
| **Template**     | Required Template selected in the **Template** step. The technical value sent to the API is `templateId`.                                                 | `Monthly tax CSV`        |
| Search templates | Optional UI search. It filters the loaded Template list by name or file name and is not sent in the generation payload.                                   | `tax`                    |
| **Database**     | Required only when a filter row is used. Select the Data Source connection; the payload uses this value as `database`.                                    | `production-postgres`    |
| **Table**        | Required only when a filter row is used. Select a table from the connection schema.                                                                       | `transactions`           |
| **Field**        | Required only when a filter row is used. Select the field to compare.                                                                                     | `created_at`             |
| **Operator**     | Required only when a filter row is used. Use `eq`, `gt`, `gte`, `lt`, `lte`, `between`, `in`, or `nin`.                                                   | **Between** / `between`  |
| **Values**       | Required only when a filter row is used. `between` needs exactly two values; `in` and `nin` accept comma-separated values; other operators use one value. | `2026-05-01, 2026-05-31` |

## Filter examples

***

| Filter                                            | Result                                   |
| ------------------------------------------------- | ---------------------------------------- |
| `status` **Equal** `active`                       | Includes only active records.            |
| `created_at` **Between** `2026-05-01, 2026-05-31` | Includes records from May 2026.          |
| `type` **In** `credit,debit`                      | Includes either transaction type.        |
| `amount` **Greater Than** `1000`                  | Includes records with amount above 1000. |

## Status and next action

***

| Status              | What it means                                                    | Operator action                                            |
| ------------------- | ---------------------------------------------------------------- | ---------------------------------------------------------- |
| `Processing`        | Reporter is generating the file.                                 | Wait. The list refreshes automatically.                    |
| `Finished`          | The file is ready.                                               | View, preview, or download the Report.                     |
| `Error`             | Reporter found an error during generation.                       | Review the message and generate again after correction.    |
| `PendingExtraction` | Reporter is waiting for data extraction before final processing. | Wait or review Data Source health if it does not progress. |

## Expected result

***

A new Report appears on the **Reports** page. When it reaches `Finished`, operators can preview or download the generated file.

## Common errors and care points

***

<AccordionGroup>
  <Accordion title="Generating with the wrong Template">
    The Template controls layout and output format. If the wrong Template is selected, generate a new Report with the correct Template.
  </Accordion>

  <Accordion title="Using a Data Source that was not tested">
    Failed or outdated connections can cause generation errors. Test the Data Source before generating operational Reports when connection health is uncertain, especially for external databases or recently changed credentials.
  </Accordion>

  <Accordion title="Using broad filters by mistake">
    Empty filters can include all available data. Confirm whether the Report should cover all records or only a specific period, status, or entity.
  </Accordion>

  <Accordion title="Expecting immediate download">
    Download is only available after the Report reaches `Finished`.
  </Accordion>
</AccordionGroup>

## Next steps

***

* Use [Download a Report](/en/lerian-console/reporter-console/downloading-a-report) when the status is `Finished`.
* Use [Correct a Report](/en/lerian-console/reporter-console/editing-a-report) if the generated file has wrong data, layout, or format.
* Use [Testing a Data Source](/en/lerian-console/reporter-console/testing-a-data-source) if generation fails because of connection or schema issues.

<CardGroup cols={2}>
  <Card title="Create report" icon="code" href="/en/reference/reporter/create-report">
    Generate Reports programmatically.
  </Card>

  <Card title="Check report status" icon="code" href="/en/reference/reporter/check-report-status">
    Poll generation status before download.
  </Card>
</CardGroup>
