# Pivot Table Print

## Content

SpreadJS allows you to print a pivot table just like printing a spreadsheet. This is particularly useful when you want the printed copy of a customized pivot table for keeping records. You can set different properties, such as `printDrill`, `itemPrintTitles` and `fieldPrintTitles` to print a pivot table with different effects.

The `printDrill` option can be used to display expand or collapse buttons on the print page. The following image depicts an example of a printing pivot table with the `printDrill` option.

![](https://gcdocumentsitekrblob.blob.core.windows.net/document-site-files/images/8d606653-16a0-474d-b9dc-e2b4d01c2446/images/printdrill.png)

The following code sample shows how to set the `printDrill` option.

```javascript
// Set printDrill option to True
myPivotTable.options.printDrill = true;
```

You can use the `itemPrintTitles` option in case the pivot table data spills over the next page and the row labels need to be repeated on the next page. undefined

![](https://gcdocumentsitekrblob.blob.core.windows.net/document-site-files/images/8d606653-16a0-474d-b9dc-e2b4d01c2446/images/itemprinttitle.png)

The following code sample shows how to set the `itemPrintTitles` option.

```javascript
// Set itemPrintTitles option to True
myPivotTable.options.itemPrintTitles = true;
```

> **Note:** This option does not work in the following cases:
>
> * When the report layout is set to tabular form and the 'merge and center cells with labels' is set to true
> * When the report layout is set to compact form

You can use the `fieldPrintTitles` option to set the print title on each page. This is helpful when there is a large number of rows and columns and you want to show headers on each page. The following image depicts an example of printing with the `fieldPrintTitles` option.

![](https://gcdocumentsitekrblob.blob.core.windows.net/document-site-files/images/8d606653-16a0-474d-b9dc-e2b4d01c2446/images/fieldprinttitles.png)

The following code sample shows how to set the `fieldPrintTitles` option.

```javascript
// Set fieldPrintTitles option to True
myPivotTable.options.fieldPrintTitles = true;
```

> **Note:** This option does not work when there are multiple pivot tables in a single spreadsheet.