# Creating Multi-Column Data Regions

In this article, we will learn how to create multi-column regions in a report model so that you can read data from multiple columns.

1. To create multi-column data regions in your Report Model, go to *Files > New > Report Model.*

![](https://627607815-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F6xzBT0roYJkfVS5klkLl%2Fuploads%2FtNJORoFJq60rWgNUl3CD%2F0.png?alt=media)

2. Now, specify the *File Path* of your report for which you want to build the report model. Download the sample PDF file from [here](https://www.astera.com/Downloads/Misc/2020/07/11-Multi-Column-Data-Region.zip).

![](https://627607815-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F6xzBT0roYJkfVS5klkLl%2Fuploads%2FCZYOhJtEhVmdfI78pqdX%2F1.png?alt=media)

3. Your report will be opened in the designer window where you can start building its model layout.

![](https://627607815-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F6xzBT0roYJkfVS5klkLl%2Fuploads%2FblbNTeTGnLzBQiymt14v%2F2.png?alt=media)

4. Right-click on the *Record* node present in model layout window on the left side of your designer screen and click on *Add Data Region*.

![](https://627607815-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F6xzBT0roYJkfVS5klkLl%2Fuploads%2F43djOWhXETCWvSIFwbKA%2F3.png?alt=media)

5. When you click on *Add Data Region*, you will see a subnode added to *Record* node in the model layout and *Region Properties* and *Pattern Properties* boxes will appear.

![](https://627607815-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F6xzBT0roYJkfVS5klkLl%2Fuploads%2Fxq9vtPqjMPZyH7p7BMzQ%2F4.png?alt=media)

6. In the *Region Properties* section, you will see a check box for *Multi-Column* region. Check that option.

![](https://627607815-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F6xzBT0roYJkfVS5klkLl%2Fuploads%2FIGicv7Fk4BXiD4KT4WNT%2F5.png?alt=media)

7. You will see another bar appear just below the pattern-matching bar for setting column boundaries. Click on the second bar above your report where your first column starts. This will create a black *dotted line* adjacent to your text on the left side. Repeat this for each column. If alignment of your *dotted line* is wrong, click on it to delete it.

The arrows show the start point for each column.

![](https://627607815-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F6xzBT0roYJkfVS5klkLl%2Fuploads%2FAPg2iOcKr484BRqDPwcQ%2F6.png?alt=media)

## **Multi-Column Region Properties**

You can also adjust the *Number of Columns* and *Column Margin* by clicking on the “..." option next to the *Multi-Column* option.

*Starting Points* box will show the points from where each column is starting. For instance, in this case, Column 1 is starting from “Point 0”, Column 2 from “Point 26” and Column 3 from “Point 52”.

![](https://627607815-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F6xzBT0roYJkfVS5klkLl%2Fuploads%2FAuA7cXSpBdJHgSb4rAM1%2F7.png?alt=media)

The number of columns correspond to the number of starting points that you will see on this screen. If there are 4 columns, you will see 4 starting points.

![](https://627607815-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F6xzBT0roYJkfVS5klkLl%2Fuploads%2F3BDkbR0NYI6oB8tf6EVa%2F8.png?alt=media)

There is an option for automatically calculating columns – *Automatically Calculate Columns*. Here, you can specify:

* *Page Margin* – where the text is starting from
* *Number of Columns* – number of columns you want to have in your layout

Astera will automatically calculate and place the margins on your layout.

For instance, there are 3 columns in this report and the page margin is 0.

![](https://627607815-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F6xzBT0roYJkfVS5klkLl%2Fuploads%2FGOytB0RPpaXe5Y3OUnG8%2F9.png?alt=media)

After specifying the *Page Margin* and *Number of Columns*, click on *Calculate*. Your starting points will be automatically calculated.

![](https://627607815-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F6xzBT0roYJkfVS5klkLl%2Fuploads%2FUMLZ90VcJDZvoGVeXuy9%2F10.png?alt=media)

## **Capturing Data from Multiple Columns**

After creating multi-column data regions, give a suitable pattern in the pattern-matching bar to select your data region.

For this model shown in the screenshot below, write “Name:” in the pattern-matching bar. You can see that it has selected data regions where the pattern matches.

![](https://627607815-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F6xzBT0roYJkfVS5klkLl%2Fuploads%2FNa7ToBrucND99nkPkzop%2F11.png?alt=media)

Increase the *Line Count* to 7 to capture all data fields.

![](https://627607815-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F6xzBT0roYJkfVS5klkLl%2Fuploads%2FPbu0GOujRB4p9R56yIfQ%2F12.png?alt=media)

Highlight the data you want to capture in a field, right click on it and select *Add Data Field.* You will see that the data in the highlighted data region has been selected and a new field is added to your model. Rename your field using the *Field Name* box in the *Region Properties* section.

Repeat the steps for all the fields to build your model layout.

![](https://627607815-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F6xzBT0roYJkfVS5klkLl%2Fuploads%2Fiij4EXPvC06LsIt2ZkIA%2F13.jpeg?alt=media)

To preview your report model, click on *Preview Data* ![](https://627607815-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F6xzBT0roYJkfVS5klkLl%2Fuploads%2FixnKY9fjQ6OZiD9nih40%2Fimage.png?alt=media\&token=79dca476-13f1-451f-bcdd-844e410b595a) option.

![](https://627607815-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F6xzBT0roYJkfVS5klkLl%2Fuploads%2FQRMLrKRe9IDOXOWoKod8%2F15.png?alt=media)

Your final output will look like this:

![](https://627607815-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F6xzBT0roYJkfVS5klkLl%2Fuploads%2Fj5eWvoCtrlsfZ8eJrqeb%2F16.png?alt=media)
