> ## 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.

# Update a Template

> Update a Template's name, output format, or replace the uploaded .tpl file directly from the Lerian Console interface.

Use this page when a Template should remain available, but something about its name, output format, layout, or source file needs to change.

## Objective

***

Update the reusable Template that future Reports will use.

For example, update a Template when the report owner changes the required CSV columns, the file must be generated as XML instead of TXT, or the Template name is too generic for operators to identify safely.

## When to use

***

Use this task when:

* the Template is still needed;
* the name or output format is wrong;
* an uploaded `.tpl` file must be replaced;
* a Template Builder Template needs block-level edits;
* future Reports should use the corrected Template.

Do not use this task to change a Report that was already generated. Generated Reports are historical files. Correct the source setup and generate a new Report.

## Before you start

***

Check what kind of Template you are editing:

* **Uploaded Template**: update the name, output format, or replace the `.tpl` file.
* **Template Builder Template**: open the builder, edit the blocks, and save the generated `.tpl`.

Confirm that the change is intended for future Reports. Reports already generated from the old Template stay unchanged.

<Warning>
  Replacing a `.tpl` file affects every future Report generated from this Template. Validate the new file before using it for a reporting cycle.
</Warning>

## Step by step

***

<Steps>
  <Step title="Open the Templates page">
    Go to **Templates** and locate the Template you need to update.
  </Step>

  <Step title="Open the edit action">
    Click the three dots (<Icon icon="ellipsis-vertical" />) in the **Actions** column and select **Edit**.
  </Step>

  <Step title="Edit the Template fields">
    In **Edit Template**, update the fields that changed. For uploaded Templates, you can change **Template Name**, **Output Format**, and **Template File (.tpl)**.
  </Step>

  <Step title="Save the changes">
    Click **Update Template**.
  </Step>

  <Step title="Generate a test Report">
    Generate a new Report with the updated Template and confirm that the output matches the expected structure.
  </Step>
</Steps>

<Note>
  Templates created with **Template Builder** open in the builder when edited. Templates uploaded as `.tpl` files open in the upload/edit wizard.
</Note>

## Field guide

***

| Field                    | What to change                                                                                                   | Example                                      |
| ------------------------ | ---------------------------------------------------------------------------------------------------------------- | -------------------------------------------- |
| **Template Name**        | Required Console label for operators. It maps to `name` in the Console and to `description` in the Reporter API. | `Monthly tax XML`                            |
| **Output Format**        | File type for future Reports. Use one of `csv`, `xml`, `html`, `txt`, or `pdf`.                                  | `xml`                                        |
| **Template File (.tpl)** | Optional replacement file. If supplied, it must be `.tpl`, larger than 0 bytes, and no larger than 5 MB.         | Replace `tax-v1.tpl` with `tax-v2.tpl`       |
| Builder blocks           | Visual structure for builder-created Templates. Saving requires at least one valid block.                        | Add a **Total amount** **Aggregation** block |

## Expected result

***

The Template stays on the **Templates** page with the updated configuration. Future Reports generated from it use the new name, output format, and Template structure.

## Common errors and care points

***

<AccordionGroup>
  <Accordion title="Expecting old Reports to change">
    Updating a Template does not rewrite Reports already generated. Generate a new Report after correcting the Template.
  </Accordion>

  <Accordion title="Replacing the file without checking output format">
    If the `.tpl` file structure and **Output Format** do not match the expected delivery format, operators can generate the wrong file type.
  </Accordion>

  <Accordion title="Renaming without operational context">
    Names like `Template 1` or `New Template` are hard to distinguish during report generation. Use a name that includes the report purpose or period.
  </Accordion>
</AccordionGroup>

## Next steps

***

* Use [Generate a Report](/en/lerian-console/reporter-console/generating-a-report) to test the updated Template.
* Use [Correct a Report](/en/lerian-console/reporter-console/editing-a-report) if the issue was found in a generated Report.
* Use [Delete a Template](/en/lerian-console/reporter-console/deleting-a-template) only if the Template is no longer needed.

<Card title="API equivalent" type="tip" horizontal>
  [Update templates endpoint](/en/reference/reporter/update-templates)
</Card>
