> For the complete documentation index, see [llms.txt](https://v5cookbook.denovolab.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://v5cookbook.denovolab.com/troubleshoot/getting-missing-table-error-during-invoice-generation.md).

# Getting "Missing table" error during invoice generation

## Problem Description

When generating manual invoice, the UI is showing "Missing table: cdr\_reportdetailyyyymmdd"

![](/files/-MYlJAg7Dt9xdm6XGfUS)

Class 4 Fusion generates invoices based off on the pre-generated reports.  If you attempt to generate invoices for dates that have no report data, it will give you that error.&#x20;

You can check when you have report data in DB:

```bash
psql -U postgres
softswitch4v5=# \d+;

```

```
 public | cdr_report_detail                                    | table    | postgres    | 8192 bytes | é¢„ç»Ÿè®¡
 public | cdr_report_detail20200608                            | table    | class4_user | 8192 bytes | 
 public | cdr_report_detail20200609                            | table    | class4_user | 8192 bytes | 
 public | cdr_report_detail20200610                            | table    | class4_user | 8192 bytes | 
 public | cdr_report_detail20200611                            | table    | class4_user | 8192 bytes | 
 public | cdr_report_detail20200612                            | table    | class4_user | 8192 bytes | 
```

{% hint style="info" %}
&#x20;Normally, this report data is not archived because it does not utilize much space.   Your system admin can drop those old cdr *report* detailyyyymmdd tables or you can use auto archiving facility in Class 4 switch to auto archive it after some times.
{% endhint %}

This cdr\_report table is also used for populating the statistics reports in the Class 4 Fusion UI.
