---
title: "Export Report showing error when run in Library/Portal"
canonical: "https://support.soutron.net/space/KNOW/701857793/Export%20Report%20showing%20error%20when%20run%20in%20Library%2FPortal"
format: markdown
---
## \uD83E\uDD14 Problem

The error in the image below is shown when trying to run an export report after a search. 

![image-20240809-154355.png](media://594221a8-333d-4f5b-aac4-2e3671f7edd3)

## \uD83C\uDF31 Solution

Just to be sure check the set-up of the report if all options are selected properly.  

In this case this was not the issue. For the solution we need to understand the cause of the problem.

**Cause: **

When an export report is set-up, there are some dependencies on the “Template” set-up. For CSV only output there is no need for a template. **But for other formats(Excel, PDF etc.) a template is necessary. **

But if for CSV, there is any sorting level defined in the definition, then it becomes dependent on the template. **This was the case here**. The report had only CSV format allowed and sorting level defined. But as there were no template set-up done, this error is shown when the report is run.

 **Solution: **

There are two solutions available here:

1. Define a template for the report from the “Template” tab. Then save the report.

![image-20240813-132638.png](media://63140d42-368d-4b07-8cc6-51cbe58fc9ec)

2. If the sorting is not mandatory for only the output, then turn off the sorting levels from the definition tab. Then save the report.

![image-20240813-132912.png](media://bdcbdb2b-1537-44f2-8a63-614bf95adde6)

**Make any of these two changes and save. The report should work properly.**

## \uD83D\uDCCE Related articles



> Macro (contentbylabel)