---
title: "How to create a report from a csv file"
canonical: "https://onesaitplatform.refined.site/space/DOCT/2220845723/How%20to%20create%20a%20report%20from%20a%20csv%20file"
format: markdown
---
### Description

This post will explain the steps to follow to create a report from a csv file that we will upload as a shared resource to the binary repository.


### Tools

Jaspersoft studio will be used to create the template and adapter.


### CSV upload to repository

First we can upload the csv file to the binary repository, public access is assigned for the example although it could be left as private and pass the token through the url to obtain it.

![image](media://4db7d0e4-93e6-47d4-976b-03011edcef3b)


### Report and adapter creation

The next step is to create a csv adapter, from the Jaspersoft studio tool,

![image](media://fff5d9ad-4695-40e5-9d84-0c473f8f6267)

The important thing is to assign the url of the file that has been uploaded to the binary repository, in the case of the example: [https://lab.onesaitplatform.com/controlpanel/files/60a4c4e4f09fad5088e6b81b](https://lab.onesaitplatform.com/controlpanel/files/60a4c4e4f09fad5088e6b81b)

![image](media://3afa62d4-6474-4243-8e08-c7827e6ac245)

After this it is exported and stored in the project explorer

![image](media://cf7ca387-3c50-4bd2-ac41-736c765b12d0)

The adapter in the example has been named caradapter, because the csv file contains car data.

After this, a new blank report is created by adding the fields to it like any other report and using the adapter created previously.

Before saving to upload the report, bear in mind that in the line where the use of the adapter is defined, in value you must add the extension .xml so that you can locate the file

![image](media://86770ba4-ebc6-4617-b227-e51f15eca4a1)

Finally, once saved, the new report is created on the platform by uploading the template and the adapter as a resource.

![image](media://dce298a8-e429-4bf1-bc40-5cc068a4bb77)

### Result

Finally, if we run the report and select the PDF option, for example, we can see the result when opening the downloaded file:

![image](media://46d8a6b1-36e6-4d25-95f7-fe840241e95e)