# Pivot Table Layout

An explanation of the three different layouts for SpreadJS Pivot Tables: compact, outline, and tabular, with UI and code examples of each

## Content

SpreadJS allows you to choose a pivot table layout and apply it using the `PivotTableLayoutType` enumeration.

* Compact Form
* Outline Form
* Tabular Form

## Compact Form

The compact form is the default report layout of a pivot table which displays each Row label in a separate row but in the same column. This layout, as the name suggests, presents data in a compact form by reducing the pivot table width. The following image depicts the compact form layout of a pivot table.

![](https://cdn.mescius.io/document-site-files/images/8d606653-16a0-474d-b9dc-e2b4d01c2446/images/compact.png)

The following table explains the behavior and positioning of Row Labels, Row Fields, and Subtotals while using the compact form layout:

| **Row Labels** | **Row Fields** | **Subtotals** |
| ---------- | ---------- | --------- |
| Row Field Label is always above the inner fields labels. | All the Row Fields are in a single column. | Subtotals can be shown at the Top or Bottom of each group. |
| To understand the fields easily, each Row Label is slightly indented, from the above field. |  | When you set Subtotals, the row fields are altered as explained below:<ul><li>Top: Subtotals are added to the existing row against the row label item</li><li>Bottom: Subtotals are added to a new row at the bottom</li></ul> |
| Row Labels cannot be repeated. |  | For Column Fields, Subtotals are always shown at the Bottom. |
| You can change the indentation of the fields in this report layout only. |  | The Row Label remains at the top, even if Subtotals are at the bottom. |

The following code sample sets the compact form layout for the pivot table.

```javascript
myPivotTable.layoutType(GC.Spread.Pivot.PivotTableLayoutType.compact);
```

You can customize the indentation level of row fields using the `rowLabelIndent` option in compact form layout.

![](https://cdn.mescius.io/document-site-files/images/8d606653-16a0-474d-b9dc-e2b4d01c2446/images/custom_compact.png)

The following code sample sets the indentation in the compact form of a pivot table.

```javascript
myPivotTable.options.rowLabelIndent = 12;
```

## Outline Form

The outline form layout shows each Row Field in a separate column. This layout is useful when you want to show all the field names as heading labels and are not concerned about the width of the pivot table. The following image depicts the outline form layout of a pivot table.

![](https://cdn.mescius.io/document-site-files/images/8d606653-16a0-474d-b9dc-e2b4d01c2446/images/outline.png)

The following table explains the behavior and positioning of Row Labels, Row Fields, and Subtotals while using the outline form layout:

| **Row Labels** | **Row Fields** | **Subtotals** |
| ---------- | ---------- | --------- |
| Each Row Label is defined in a separate row. | All the Row Fields are in a separate column. | Subtotals can be shown at the Top or Bottom of each group. |
| Row Field Label is always above the inner fields labels. | Each Row Field shows its name in the column heading. | When you set Subtotals, the row fields are altered as explained below:<ul><li>Top: Subtotals are added to the existing row against the row label item</li><li>Bottom: Subtotals are added to a new row at the bottom</li></ul> |
| Row Labels can be repeated. |  | For Column Fields, Subtotals are always shown at the Bottom. |

The following code sample sets the outline form layout for a pivot table.

```javascript
myPivotTable.layoutType(GC.Spread.Pivot.PivotTableLayoutType.outline);
```

## Tabular Form

The tabular form layout is similar to the outline form layout except for the difference that the row label for the outer field is on the same row as the first label for the related inner field. Hence, it reduces the number of rows in the pivot table. The following image depicts the tabular form layout of the pivot table.

![](https://cdn.mescius.io/document-site-files/images/8d606653-16a0-474d-b9dc-e2b4d01c2446/images/tabular.png)

The following table explains the behavior and positioning of Row Labels, Row Fields, and Subtotals while using the tabular form layout:

| **Row Labels** | **Row Fields** | **Subtotals** |
| ---------- | ---------- | --------- |
| Row Labels for the outer fields are on the same row as the first label for the related inner fields. | All the Row Fields are in a separate column. | Subtotals can only be shown at the bottom of each group. |
| Row Labels can be repeated. | Each Row Field shows its name in the column heading. | When you set Subtotals at the bottom, a new row is added at the bottom. |
|  |  | For Column Fields, Subtotals are always shown at the Bottom. |

The following code sample sets the tabular form layout for the pivot table.

```javascript
myPivotTable.layoutType(GC.Spread.Pivot.PivotTableLayoutType.tabular);
```

## Additional Settings

### Set Subtotals and GrandTotals

You can set the position of subtotals and grand totals using the `subtotalsPosition` and `grandTotalPosition` options respectively. The `subtotalsPosition` can be set to none, top, or bottom values (as applicable to the layouts mentioned above) whereas the grandTotalPosition can be set to all values (such as none, both, col, or row) for all layouts. By default, the `subtotalsPosition` option is set to “bottom” and the `grandTotalPosition` option is set to “both”.
The following code sample sets the position of subtotals and grand totals in the pivot table.

```javascript
// Set SubtotalsPosition to none
myPivotTable.options.subtotalsPosition = GC.Spread.Pivot.SubtotalsPosition.none;
        
// Set grandTotalPosition to col
myPivotTable.options.grandTotalPosition = GC.Spread.Pivot.GrandTotalPosition.col;
```

<span class="NormalTextRun SCXW43567044 BCX8" style="margin: 0px; padding: 0px; user-select: text; -webkit-user-drag: none; -webkit-tap-highlight-color: transparent;">Additionally, SpreadJS also enables you to improve the appearance of the subtotal by adjusting its position to a single field. Currently, the field subtotal position only supports </span>**<span class="NormalTextRun SpellingErrorV2Themed SCXW43567044 BCX8" style="margin: 0px; padding: 0px; user-select: text; -webkit-user-drag: none; -webkit-tap-highlight-color: transparent; background-repeat: repeat-x; background-position: left bottom; background-image: var(--urlSpellingErrorV2, url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPHN2ZyB3aWR0aD0iNXB4IiBoZWlnaHQ9IjRweCIgdmlld0JveD0iMCAwIDUgNCIgdmVyc2lvbj0iMS4xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIj4KICAgIDwhLS0gR2VuZXJhdG9yOiBTa2V0Y2ggNTYuMiAoODE2NzIpIC0gaHR0cHM6Ly9za2V0Y2guY29tIC0tPgogICAgPHRpdGxlPnNwZWxsaW5nX3NxdWlnZ2xlPC90aXRsZT4KICAgIDxkZXNjPkNyZWF0ZWQgd2l0aCBTa2V0Y2guPC9kZXNjPgogICAgPGcgaWQ9IkZsYWdzIiBzdHJva2U9Im5vbmUiIHN0cm9rZS13aWR0aD0iMSIgZmlsbD0ibm9uZSIgZmlsbC1ydWxlPSJldmVub2RkIj4KICAgICAgICA8ZyB0cmFuc2Zvcm09InRyYW5zbGF0ZSgtMTAxMC4wMDAwMDAsIC0yOTYuMDAwMDAwKSIgaWQ9InNwZWxsaW5nX3NxdWlnZ2xlIj4KICAgICAgICAgICAgPGcgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoMTAxMC4wMDAwMDAsIDI5Ni4wMDAwMDApIj4KICAgICAgICAgICAgICAgIDxwYXRoIGQ9Ik0wLDMgQzEuMjUsMyAxLjI1LDEgMi41LDEgQzMuNzUsMSAzLjc1LDMgNSwzIiBpZD0iUGF0aCIgc3Ryb2tlPSIjRUIwMDAwIiBzdHJva2Utd2lkdGg9IjEiPjwvcGF0aD4KICAgICAgICAgICAgICAgIDxyZWN0IGlkPSJSZWN0YW5nbGUiIHg9IjAiIHk9IjAiIHdpZHRoPSI1IiBoZWlnaHQ9IjQiPjwvcmVjdD4KICAgICAgICAgICAgPC9nPgogICAgICAgIDwvZz4KICAgIDwvZz4KPC9zdmc+)); border-bottom: 1px solid transparent;">subtotalsPosition.top</span>**<span class="NormalTextRun SCXW43567044 BCX8" style="margin: 0px; padding: 0px; user-select: text; -webkit-user-drag: none; -webkit-tap-highlight-color: transparent;"> and </span>**<span class="NormalTextRun SpellingErrorV2Themed SCXW43567044 BCX8" style="margin: 0px; padding: 0px; user-select: text; -webkit-user-drag: none; -webkit-tap-highlight-color: transparent; background-repeat: repeat-x; background-position: left bottom; background-image: var(--urlSpellingErrorV2, url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPHN2ZyB3aWR0aD0iNXB4IiBoZWlnaHQ9IjRweCIgdmlld0JveD0iMCAwIDUgNCIgdmVyc2lvbj0iMS4xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIj4KICAgIDwhLS0gR2VuZXJhdG9yOiBTa2V0Y2ggNTYuMiAoODE2NzIpIC0gaHR0cHM6Ly9za2V0Y2guY29tIC0tPgogICAgPHRpdGxlPnNwZWxsaW5nX3NxdWlnZ2xlPC90aXRsZT4KICAgIDxkZXNjPkNyZWF0ZWQgd2l0aCBTa2V0Y2guPC9kZXNjPgogICAgPGcgaWQ9IkZsYWdzIiBzdHJva2U9Im5vbmUiIHN0cm9rZS13aWR0aD0iMSIgZmlsbD0ibm9uZSIgZmlsbC1ydWxlPSJldmVub2RkIj4KICAgICAgICA8ZyB0cmFuc2Zvcm09InRyYW5zbGF0ZSgtMTAxMC4wMDAwMDAsIC0yOTYuMDAwMDAwKSIgaWQ9InNwZWxsaW5nX3NxdWlnZ2xlIj4KICAgICAgICAgICAgPGcgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoMTAxMC4wMDAwMDAsIDI5Ni4wMDAwMDApIj4KICAgICAgICAgICAgICAgIDxwYXRoIGQ9Ik0wLDMgQzEuMjUsMyAxLjI1LDEgMi41LDEgQzMuNzUsMSAzLjc1LDMgNSwzIiBpZD0iUGF0aCIgc3Ryb2tlPSIjRUIwMDAwIiBzdHJva2Utd2lkdGg9IjEiPjwvcGF0aD4KICAgICAgICAgICAgICAgIDxyZWN0IGlkPSJSZWN0YW5nbGUiIHg9IjAiIHk9IjAiIHdpZHRoPSI1IiBoZWlnaHQ9IjQiPjwvcmVjdD4KICAgICAgICAgICAgPC9nPgogICAgICAgIDwvZz4KICAgIDwvZz4KPC9zdmc+)); border-bottom: 1px solid transparent;">subtotalsPosition.bottom</span>**<span class="NormalTextRun SCXW43567044 BCX8" style="margin: 0px; padding: 0px; user-select: text; -webkit-user-drag: none; -webkit-tap-highlight-color: transparent;">.</span><span class="EOP SCXW43567044 BCX8" data-ccp-props="{201341983:0,335559685:0,335559739:160,335559740:259}" style="margin: 0px; padding: 0px; user-select: text; -webkit-user-drag: none; -webkit-tap-highlight-color: transparent; color: rgb(0, 0, 0); font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: left; text-indent: 0px; text-transform: none; white-space: pre-wrap; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255); text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial; font-size: 11pt; line-height: 19.425px; font-family: Calibri, Calibri_EmbeddedFont, Calibri_MSFontService, sans-serif;"> </span>

```javascript
pivotTable.add("Date","Date",GC.Spread.Pivot.PivotTableFieldType.rowField);
pivotTable.subtotalPosition("Date", GC.Spread.Pivot.SubtotalsPosition.top);
```

![pt-subtotal](https://cdn.mescius.io/document-site-files/images/df1fe1ee-eb3c-4da7-8c20-a0d8d2b7e734/pt-subtotal.50404a.gif?width=500)
<span style="margin: 0px; padding: 0px; user-select: text; -webkit-user-drag: none; -webkit-tap-highlight-color: transparent;" class="NormalTextRun SCXW83217935 BCX0">In SpreadJS Designer, you can use the current field’s </span>**<span style="margin: 0px; padding: 0px; user-select: text; -webkit-user-drag: none; -webkit-tap-highlight-color: transparent;" class="NormalTextRun SCXW83217935 BCX0">Field Settings</span>**<span style="margin: 0px; padding: 0px; user-select: text; -webkit-user-drag: none; -webkit-tap-highlight-color: transparent;" class="NormalTextRun SCXW83217935 BCX0"> dialog to set subtotals position at the top of the pivot table’s field. However, the default subtotals position in the pivot table is bottom.</span><span style="margin: 0px; padding: 0px; user-select: text; -webkit-user-drag: none; -webkit-tap-highlight-color: transparent; color: rgb(0, 0, 0); font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: left; text-indent: 0px; text-transform: none; white-space: pre-wrap; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255); text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial; font-size: 11pt; line-height: 19.425px; font-family: Calibri, Calibri_EmbeddedFont, Calibri_MSFontService, sans-serif;" data-ccp-props="{201341983:0,335559739:160,335559740:259}" class="EOP SCXW83217935 BCX0"> </span>
![subtotal-designer-dialog](https://cdn.mescius.io/document-site-files/images/df1fe1ee-eb3c-4da7-8c20-a0d8d2b7e734/subtotal-designer-dialog.bf28a8.png?width=600)

> **<span class="NormalTextRun SCXW85767293 BCX8" data-ccp-parastyle="heading 2" style="margin: 0px; padding: 0px; user-select: text; -webkit-user-drag: none; -webkit-tap-highlight-color: transparent;">Note:</span>**<span class="EOP SCXW85767293 BCX8" data-ccp-props="{134245418:true,134245529:true,201341983:0,335559738:40,335559739:0,335559740:259}" style="margin: 0px; padding: 0px; user-select: text; -webkit-user-drag: none; -webkit-tap-highlight-color: transparent; font-size: 11pt; line-height: 19.425px; font-family: Calibri, Calibri_EmbeddedFont, Calibri_MSFontService, sans-serif; color: rgb(23, 43, 77);"> </span>
>
> * <span class="NormalTextRun SCXW85767293 BCX8" style="margin: 0px; padding: 0px; user-select: text; -webkit-user-drag: none; -webkit-tap-highlight-color: transparent;">PivotTable’s Compact and Outline layouts list the subtotal at the bottom by default, whereas the "Tabular" layout simply displays it at the bottom and doesn’t allow changing the position.</span><span class="EOP SCXW85767293 BCX8" data-ccp-props="{201341983:0,335559739:160,335559740:259}" style="margin: 0px; padding: 0px; user-select: text; -webkit-user-drag: none; -webkit-tap-highlight-color: transparent; font-size: 11pt; line-height: 19.425px; font-family: Calibri, Calibri_EmbeddedFont, Calibri_MSFontService, sans-serif;"> </span>
> * <span class="NormalTextRun SCXW85767293 BCX8" style="margin: 0px; padding: 0px; user-select: text; -webkit-user-drag: none; -webkit-tap-highlight-color: transparent;">Resetting the PivotTable’s layout resets the field's </span>**<span class="NormalTextRun SpellingErrorV2Themed SCXW85767293 BCX8" style="margin: 0px; padding: 0px; user-select: text; -webkit-user-drag: none; -webkit-tap-highlight-color: transparent; background-repeat: repeat-x; background-position: left bottom; background-image: var(--urlSpellingErrorV2, url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPHN2ZyB3aWR0aD0iNXB4IiBoZWlnaHQ9IjRweCIgdmlld0JveD0iMCAwIDUgNCIgdmVyc2lvbj0iMS4xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIj4KICAgIDwhLS0gR2VuZXJhdG9yOiBTa2V0Y2ggNTYuMiAoODE2NzIpIC0gaHR0cHM6Ly9za2V0Y2guY29tIC0tPgogICAgPHRpdGxlPnNwZWxsaW5nX3NxdWlnZ2xlPC90aXRsZT4KICAgIDxkZXNjPkNyZWF0ZWQgd2l0aCBTa2V0Y2guPC9kZXNjPgogICAgPGcgaWQ9IkZsYWdzIiBzdHJva2U9Im5vbmUiIHN0cm9rZS13aWR0aD0iMSIgZmlsbD0ibm9uZSIgZmlsbC1ydWxlPSJldmVub2RkIj4KICAgICAgICA8ZyB0cmFuc2Zvcm09InRyYW5zbGF0ZSgtMTAxMC4wMDAwMDAsIC0yOTYuMDAwMDAwKSIgaWQ9InNwZWxsaW5nX3NxdWlnZ2xlIj4KICAgICAgICAgICAgPGcgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoMTAxMC4wMDAwMDAsIDI5Ni4wMDAwMDApIj4KICAgICAgICAgICAgICAgIDxwYXRoIGQ9Ik0wLDMgQzEuMjUsMyAxLjI1LDEgMi41LDEgQzMuNzUsMSAzLjc1LDMgNSwzIiBpZD0iUGF0aCIgc3Ryb2tlPSIjRUIwMDAwIiBzdHJva2Utd2lkdGg9IjEiPjwvcGF0aD4KICAgICAgICAgICAgICAgIDxyZWN0IGlkPSJSZWN0YW5nbGUiIHg9IjAiIHk9IjAiIHdpZHRoPSI1IiBoZWlnaHQ9IjQiPjwvcmVjdD4KICAgICAgICAgICAgPC9nPgogICAgICAgIDwvZz4KICAgIDwvZz4KPC9zdmc+)); border-bottom: 1px solid transparent;">subtotalPosition</span>**<span class="NormalTextRun SCXW85767293 BCX8" style="margin: 0px; padding: 0px; user-select: text; -webkit-user-drag: none; -webkit-tap-highlight-color: transparent;"> status to the global pivot table subtotal position. In contrast, resetting the PivotTable’s subtotal position resets the </span>**<span class="NormalTextRun SpellingErrorV2Themed SCXW85767293 BCX8" style="margin: 0px; padding: 0px; user-select: text; -webkit-user-drag: none; -webkit-tap-highlight-color: transparent; background-repeat: repeat-x; background-position: left bottom; background-image: var(--urlSpellingErrorV2, url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPHN2ZyB3aWR0aD0iNXB4IiBoZWlnaHQ9IjRweCIgdmlld0JveD0iMCAwIDUgNCIgdmVyc2lvbj0iMS4xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIj4KICAgIDwhLS0gR2VuZXJhdG9yOiBTa2V0Y2ggNTYuMiAoODE2NzIpIC0gaHR0cHM6Ly9za2V0Y2guY29tIC0tPgogICAgPHRpdGxlPnNwZWxsaW5nX3NxdWlnZ2xlPC90aXRsZT4KICAgIDxkZXNjPkNyZWF0ZWQgd2l0aCBTa2V0Y2guPC9kZXNjPgogICAgPGcgaWQ9IkZsYWdzIiBzdHJva2U9Im5vbmUiIHN0cm9rZS13aWR0aD0iMSIgZmlsbD0ibm9uZSIgZmlsbC1ydWxlPSJldmVub2RkIj4KICAgICAgICA8ZyB0cmFuc2Zvcm09InRyYW5zbGF0ZSgtMTAxMC4wMDAwMDAsIC0yOTYuMDAwMDAwKSIgaWQ9InNwZWxsaW5nX3NxdWlnZ2xlIj4KICAgICAgICAgICAgPGcgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoMTAxMC4wMDAwMDAsIDI5Ni4wMDAwMDApIj4KICAgICAgICAgICAgICAgIDxwYXRoIGQ9Ik0wLDMgQzEuMjUsMyAxLjI1LDEgMi41LDEgQzMuNzUsMSAzLjc1LDMgNSwzIiBpZD0iUGF0aCIgc3Ryb2tlPSIjRUIwMDAwIiBzdHJva2Utd2lkdGg9IjEiPjwvcGF0aD4KICAgICAgICAgICAgICAgIDxyZWN0IGlkPSJSZWN0YW5nbGUiIHg9IjAiIHk9IjAiIHdpZHRoPSI1IiBoZWlnaHQ9IjQiPjwvcmVjdD4KICAgICAgICAgICAgPC9nPgogICAgICAgIDwvZz4KICAgIDwvZz4KPC9zdmc+)); border-bottom: 1px solid transparent;">subtotalPosition</span>**<span class="NormalTextRun SCXW85767293 BCX8" style="margin: 0px; padding: 0px; user-select: text; -webkit-user-drag: none; -webkit-tap-highlight-color: transparent;"> status for each field to the same global value.  </span><span class="EOP SCXW85767293 BCX8" data-ccp-props="{201341983:0,335559739:160,335559740:259}" style="margin: 0px; padding: 0px; user-select: text; -webkit-user-drag: none; -webkit-tap-highlight-color: transparent; font-size: 11pt; line-height: 19.425px; font-family: Calibri, Calibri_EmbeddedFont, Calibri_MSFontService, sans-serif;"> </span>
> * <span class="NormalTextRun SCXW85767293 BCX8" style="margin: 0px; padding: 0px; user-select: text; -webkit-user-drag: none; -webkit-tap-highlight-color: transparent;">Currently, SpreadJS does not support rearranging a single field.</span><span class="EOP SCXW85767293 BCX8" data-ccp-props="{201341983:0,335559739:160,335559740:259}" style="margin: 0px; padding: 0px; user-select: text; -webkit-user-drag: none; -webkit-tap-highlight-color: transparent; font-size: 11pt; line-height: 19.425px; font-family: Calibri, Calibri_EmbeddedFont, Calibri_MSFontService, sans-serif;"> </span>

### Show Subtotal for Individual Fields

You can control whether subtotal information is displayed for individual fields in a pivot table, similar to Excel.

![PivotTable_ShowSubtotal](https://cdn.mescius.io/document-site-files/images/7719ad0a-f083-46d7-aff6-f63e2e187c15/PivotTable_ShowSubtotal.f31455.png?width=220)

To manage the visibility of subtotals for specific fields, you can use the `subtotalVisible` method. The following code sample shows subtotals in a pivot table for the "Date" field.

```javascript
pivotTable.subtotalVisible("Date", true); // Value can be true or false
```

> **Notes**:
>
> * Changing the grandTotalPosition will reset the visibility settings for all fields.
> * Hiding a field’s subtotal does not affect its position (e.g., whether it is displayed at the top or bottom).
>     Similarly, the subtotal position does not impact whether the subtotal is displayed or hidden.
> * Subtotals on a field can be hidden or displayed separately.

### Set Repeat Label Items

For the outline and tabular form layouts, you can enable repeating item labels in the outer row fields using the `fillDownLabels` option.
The following code sample sets the repeat label items to true in the tabular form layout.

```Javascript
// Set repeat label items
myPivotTable.options.fillDownLabels = true;
```

> **Note:** This option cannot be applied to Compact form.

### Set Blank Rows

You can add a blank row after each item using the `insertBlankLineAfterEachItem` option that helps to understand the data easily.
The following code sample sets the blank rows after each item in the pivot table.

```javascript
// Set blank rows with layout
myPivotTable.options.insertBlankLineAfterEachItem = true;
```

The following image shows the tabular form layout of the pivot table with all the additional settings as explained above.

![](https://cdn.mescius.io/document-site-files/images/8d606653-16a0-474d-b9dc-e2b4d01c2446/images/final_output.png)