# Getting "Missing table" error during invoice generation

## Problem Description

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

![](https://2160858555-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MYRPW5mw1EmjxhpuA4p%2F-MYlJ6sC2Otr7lUVb9W-%2F-MYlJAg7Dt9xdm6XGfUS%2Fimage.png?alt=media\&token=1cd10c1a-f07c-4442-8030-1ba99a5dba84)

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.
