# Layers

This topic demonstrates the use of layers in different scenarios using ActiveReports.

## Content



The Layers sample demonstrates how to work with Layers.

![An RDL report with layers](https://cdn.mescius.io/document-site-files/images/b298aea2-8cb8-4a0f-be88-4f54aa263ebd/images/layersample_english.png)

### Sample Location

**Visual Basic.NET**

[https://github.com/activereports/Samples19/tree/main/API/PageAndRDLX/Layers/VB.NET](https://github.com/activereports/Samples19/tree/main/API/PageAndRDLX/Layers/VB.NET)

**C#**

[https://github.com/activereports/Samples19/tree/main/API/PageAndRDLX/Layers/C#](https://github.com/activereports/Samples19/tree/main/API/PageAndRDLX/Layers/C%23)

### Details

The sample report consists of two layers, **Preprint paper** **layer** and **Data output layer**. The **Preprint paper** **layer** contains the report background and the **Data output layer** contains report data.

For the **Preprint paper layer**, you can set the TargetDevice (Screen, Paper, Export) to show the background, using the options in the checkboxes.<br />The TargetDevice setting for the layer is updated once you click the **Preview** button.

See [Layers](/activereportsnet/docs/v19.2/report-authors/design-reports/design-page-rdl-reports/layers) for further details.

### LayersForm

This is the main form that appears when you run the Layers sample.

Right-click the form and select **View Code** to see how to set up the report designer. It also contains code to preview the Layer report and set the target device for the layer to the report, and export the report displayed in the Viewer to PDF.

### Layer.rdlx

**Layer.rdlx**: This report uses the BILL.db data source. The TextBox controls are used to display the Payment Form fields.

This report is contains two Layers with the following controls and TargetDevice settings.

| **Layer Name** | **Target Device** | Description |
| --- | --- | --- |
| default | All | This is a default layer that contains all report data. |
| PrePrintPaper | All | Contains the report background. |