> For the complete documentation index, see [llms.txt](https://docs.octoxlabs.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.octoxlabs.com/documentation/use-octoxlabs/reports/generate-a-report.md).

# Generate a Report

Create a PDF, CSV or XLSX report with the Report Builder, track its status and download it.

Use the **Report Builder** to export the result of one or more saved queries, or one or more dashboards, as a file.

### Before you begin

* You need permission to view and add reports. The **Report Builder** menu item appears only if you can add reports, and downloading needs the download report permission.
* Create the saved queries (or dashboards, for PDF) that supply the data first. See Create and Save Queries and Create a Dashboard Chart.
* To email the report, configure SMTP.

### Create a report

Open **Reports** > **Report Builder**. The builder has three steps: **Define**, **Builder** and **Configure**.

{% stepper %}
{% step %}

#### Define the report

Fill in the **Define** step:

| Field                | What it does                                                                                                                                                                                   |
| -------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Report Name**      | Required. The name shown in the report list. It also appears in the generated file name.                                                                                                       |
| **Export Type**      | **PDF**, **CSV** or **XLSX**. The default is **CSV**.                                                                                                                                          |
| **Include Logo?**    | Shown for PDF only. Adds your company logo to the page header (see Company Logo). Without it, the OctoXLabs logo is used.                                                                      |
| **Report Template**  | **OctoXLabs** (the default query report), **Device By Adapter**, **Vulnerability By Device** or **Software By Device**. **Software By Device** is offered only for **XLSX**. See Report Types. |
| **Select Dashboard** | Shown for PDF with the **OctoXLabs** template. Adds one or more dashboards to the PDF.                                                                                                         |
| **Description**      | Free text. It appears on the PDF cover page and in the email body.                                                                                                                             |
| **Schedule**         | Switch on to run the report on a schedule. See Schedule a Report.                                                                                                                              |

Select **Next**.
{% endstep %}

{% step %}

#### Choose the data

In the **Builder** step:

1. Pick the inventory in the inventory selector. It is locked when the template is not **OctoXLabs**, because the other templates use a fixed inventory.
2. Pick the saved queries. **CSV** accepts one query. **PDF** and **XLSX** accept several, and each query becomes its own table (PDF) or worksheet (XLSX). A query is required, except for a PDF that has at least one dashboard.
3. Pick a **Discovery Date** to report on an earlier discovery. The field is hidden when you schedule the report, because scheduled runs always use the latest discovery.
4. For the **OctoXLabs** template, select **Edit Columns** to choose the columns of the file.

Once you pick a single query, the page shows its query wizard and a preview grid with the first 20 matching records. If a non-scheduled report has no data to show, you see **No data found for this query. You cannot proceed to the next step without results.** and cannot continue.

IMAGEHERE: the Builder step with one query selected, showing the query wizard and the preview grid.

Select **Next**.
{% endstep %}

{% step %}

#### Configure the delivery and create

The **Configure** step shows the name and description read-only. To email the finished file, fill in the **E-Mail** section:

* **Subject**: the email subject. If you leave it empty, "Your report is ready" is saved.
* **Recipients**: type an address and press Enter to add it.
* **CC**: same as **Recipients**, for copy recipients.

Select **Create**. The report is queued and the list opens, with the new report in **Processing** status.
{% endstep %}
{% endstepper %}

### Track and download the report

**Reports** > **Reports** lists every report you can see: reports you created, public reports, and reports shared with one of your groups. Use **Search**, **Report Format**, **Status** and **Inventory** to filter.

| Column                                         | Meaning                                                     |
| ---------------------------------------------- | ----------------------------------------------------------- |
| **Report Name**, **Description**               | Name and description from the Define step.                  |
| **Created By**                                 | The user who created the report.                            |
| **Dashboards**, **Queries**                    | The sources used.                                           |
| **Inventory**, **Template**, **Report Format** | The inventory, template and file format.                    |
| **Schedule**                                   | A green dot if the report has a schedule, a red one if not. |
| **Created Date**                               | When the report was created.                                |
| **Status**                                     | **Processing**, **Ready** or **Failed**.                    |

When the status is **Ready**, select the download icon on the row. To download several reports at once, select the rows, then **Actions** > **Download Selected**. OctoXLabs returns a ZIP file and skips reports that are still processing.

Other row actions: the duplicate icon creates a copy named " - Copy" (with its schedule, if it has one), the edit icon opens the schedule editor (available only for scheduled reports), and the delete icon removes the report and its file. A scheduled report cannot be deleted until you delete its schedule. **Actions** > **Delete Selected** removes several reports and their schedules at once.

{% hint style="info" %}
You can also export from an inventory page without the builder. The **Download** menu on an inventory list offers **CSV**, **PDF** and **XLSX**; the report uses the current query and columns and appears in the report list as " Report".
{% endhint %}

### Verify the result

The report reaches **Ready** and the downloaded file opens with your data. If a recipient was set, the mail arrives with the file attached.

### Troubleshooting

| Symptom                                                 | Cause                                                                                                                             | Fix                                                                                              |
| ------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------ |
| Status is **Failed**                                    | The report has no source left (for example its saved query was deleted), or the report service did not answer within 600 seconds. | Edit the report sources or create it again. An error entry is also written to System Activities. |
| **CSV and Excel reports must have at least one query.** | A CSV or XLSX report has no query.                                                                                                | Select at least one saved query.                                                                 |
| **The report has no query or dashboard to export.**     | A PDF report has neither queries nor dashboards.                                                                                  | Add a query or a dashboard.                                                                      |
| The report completes but no mail arrives                | The email is sent after the file is built. A mail error is only written to the log and does not fail the report.                  | Check SMTP and the recipient addresses.                                                          |

### What's next?

<table data-view="cards"><thead><tr><th></th><th></th><th data-hidden data-card-target data-type="content-ref"></th></tr></thead><tbody><tr><td><strong>Schedule a Report</strong></td><td>Run the same report automatically.</td><td></td></tr><tr><td><strong>Report Types</strong></td><td>See what each template puts in the file.</td><td></td></tr><tr><td><strong>Queries</strong></td><td>Build the queries a report uses.</td><td></td></tr></tbody></table>
