---
title: "(NEW) Support to Word Templates in Report Engine"
canonical: "https://onesaitplatform.refined.site/space/DOCT/3845521409/(NEW)%20Support%20to%20Word%20Templates%20in%20Report%20Engine"
format: markdown
---
> Macro (toc)

> ℹ️ Available since Release 5.1.0 (Survivor)

# Introduction

Up until now, the ability to generate Reports in Onesait Platform was based on Jasper Reports, allowing reports to be generated in different formats from Jasper templates.

In this version, we have included support for generating reports from templates in Microsoft Word format. In this way, business users with more limited knowledge will be able to add report templates, without the need to have knowledge of Jasper.

# How does it work?

This functionality is based on creating templates using Word documents, through a label language based on Poi-tl [https://github.com/Sayi/poi-tl](https://github.com/Sayi/poi-tl)

The Word templates must have tags between {{ and }} for the system to detect that, and thus be able to modify these tags for the information the user wants.

With Poi-tl, you can not only replace simple values, but also insert tables with their respective values, insert images, modify styles, etc.

# Example of Microsoft Word Template with Poi-tl

In the image below, you can see how you can create a template in a simple way. After processing the template, the tags will be replaced by the values that you want, and you will see the template filled with real data.

![image](media://9359b8fe-7a80-4d1c-87c2-898ca518da35)

## Microsoft Word Reports on Onesait Platform

In the main Report screen, we have added a new table so that you can quickly see the Reports that use Jasper or Word templates:

![image](media://71ab7a5f-62f4-4470-81f4-6c2a396d55de)

When you want to generate a Report with a Word template, you will be able to see the following window in which you will be able to select the fields that you wish to fill in, and the value that you are going to give to that fields:

![image](media://8fdf9341-fb08-4aad-b14f-b06c5f43fd6e)

You can also choose whether to obtain the Report as a Word file or as a PDF. After pressing the “Generate” button, the download of the Report will begin with the extension that you had selected.

![image](media://77d80e4c-01ae-4117-825c-b294106ebef8)

# Support technology

The functionality for creating Word templates is based on:

- Poi-tl: for [https://github.com/Sayi/poi-tl](https://github.com/Sayi/poi-tl) templates.
- Apache POI: for conversion to different formats: [https://poi.apache.org/](https://poi.apache.org/)