> For the complete documentation index, see [llms.txt](https://docs.gapvelocity.ai/webmap/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.gapvelocity.ai/webmap/powerbuilder-to-.net/reports/report-rendering-in-modernized-code.md).

# Report Rendering in Modernized Code

This section describes where reports are rendered in the application UI and the mechanisms that make them work.

## Reports in the UI <a href="#reports-in-the-ui" id="reports-in-the-ui"></a>

Reports are rendered inside `DataManagerControl` controls. These controls are added to the frontend component templates using the following descriptor:

```
                    

```

The following line is used to configure a `DataManagerControl` to display a report.

```
this.myDataManagerControl.Object.Print.Preview = true;
```

This property is transferred to the code executed in the frontend using the synchronization mechanism (*TODO LINK TO SYNC PROCESS*). This property instructs the frontend to display a PDF Viewer in the area assigned to the *DataManagerControl*.

This PDF Viewer control is requests a PDF using the *DataManagerController.printDataManager* endpoint.

The implementation of the *DataManagerController.printDataManager* endpoint calls ReportWatcher and returns the rendered PDF.

## Implicit use of the *ReportWatcher* service <a href="#implicit-use-of-the-reportwatcher-service" id="implicit-use-of-the-reportwatcher-service"></a>

Notice that modernized applications should not call the *ReportWatcher* service directly. This service is automatically called when having a `DataManagerControl` (TODO ADD REFERENCE TO DATAMANAGER DOCUMENTATION) configured to show itself as a report.

## Report rendering internals <a href="#report-rendering-internals" id="report-rendering-internals"></a>

The following diagram shows a summary on how the different components interact when processing a report request.

Part of the process of creating a report from a DataManager involves :

1. Converting the DataManager to a SSRS report definition in RDL format
2. Extracting the data of the report and generating a System.Data.DataSet dump of all the data required to render the report.

These processes are described in the [RDL Conversion section](http://product-docs.azurewebsites.net/PBNet/articles/reports/RDLConversion.html).
