# Report Destinations

Canonical page: https://www.adaptabletools.com/docs/handbook-exporting-destinations

- AdapTable provides 2 System Export Destinations for Reports: `Download` and  `Clipboard`
- Developers can configure which are available - including on a per Report basis

The Report Export Destination determines where a Report is sent.

## System Export Destinations

AdapTable ships with 2 Export Destinations
  - `Download` - available for **all** Report Formats
  - `Clipboard` - available only for `CSV` and `JSON` Report Formats

- The Export button displays a dropdown showing all available Destinations for current Report and Report Format
- However, if the Report can only have a single Destination, the Export button becomes a regular button

### Limiting System Destinations

By default both System Export Destinations are available to users.

Where this is not required behaviour, use the `systemExportDestinations` property in [Export Options](https://www.adaptabletools.com/docs/technical-reference-exporting/index.md).

The property returns a list (either directly or via a function) of which System Destinations should be available.

### `systemExportDestinations`

Sets which Export Destinations provided by AdapTable are available for Reports

  [`SystemExportDestinations[]`](https://www.adaptabletools.com/docs/reference/systemexportdestination.md)

Use this property to specify a custom list of the System Destinations which should be available to users.

You can return either an array of destinations, or provide a function which returns an array.

<b>Hard Coded List</b>

The simplest method is to return an array listing which System Destinations should be available:

```ts {4}
// Make only the 'Download' System Export Destination available (hiding the Clipboard)
const adaptableOptions: AdaptableOptions = {
    exportOptions: {
        systemExportDestinations: ['Download'],
    }
} 
```

Provide an **empty** array if you want **none** to be available:
```ts {4}
// Show No System Export Destinations
const adaptableOptions: AdaptableOptions = {
    exportOptions: {
        systemExportDestinations: [],
    }
}  
```

<b>Via a Function</b>

Alternatively, you can provide a function which returns the System Destinations.

The function receives context of type  [`SystemExportDestinationsContext`](https://www.adaptabletools.com/docs/reference/systemexportdestinationscontext.md) defined as follows:

| Property | Type | Description |
| --- | --- | --- |
| [currentLayoutName](https://www.adaptabletools.com/docs/reference/systemexportdestinationscontext.md#currentlayoutname) | `string` | Name of current Layout |
| [currentReportFormat](https://www.adaptabletools.com/docs/reference/systemexportdestinationscontext.md#currentreportformat) | [`ReportFormatType`](https://www.adaptabletools.com/docs/reference/reportformattype.md) | Format of current Report |
| [currentReportName](https://www.adaptabletools.com/docs/reference/systemexportdestinationscontext.md#currentreportname) | [`ReportNameType`](https://www.adaptabletools.com/docs/reference/reportnametype.md) | Name of current Report |
| [defaultSystemExportDestinations](https://www.adaptabletools.com/docs/reference/systemexportdestinationscontext.md#defaultsystemexportdestinations) | [`SystemExportDestination`](https://www.adaptabletools.com/docs/reference/systemexportdestination.md)`[]` | Default System Export Destinations |
| [adaptableContext](https://www.adaptabletools.com/docs/reference/systemexportdestinationscontext.md#adaptablecontext) | `any` | Custom application Context provided in `AdaptableOptions.adaptableContext` |

```ts {4}
// Only Export to Download for the 'All Data' report
const adaptableOptions: AdaptableOptions = {
    exportOptions: {
      systemExportDestinations: (context: SystemExportDestinationsContext) => {
        return context.currentReportName == 'All Data'
          ? ['Download']
          : context.defaultSystemExportDestinations;
      },
    }
} 
```

**Example: Configuring System Export Destinations**

Configuring which System Export Destinations are available

 

- In this example AdapTable has been limited to just the Clipboard System Export Destination

Demo project (Vanilla); the files without a marker are shown below:

```text
src/
  adaptableOptions.ts
  agGridModules.ts     [template]
  columnDefs.ts        [template]
  gridOptions.ts       [template]
  index.ts             [template]
  onAdaptableReady.ts  [template]
  rowData.ts           [template]
  styles.css           [template]
index.html             [template]
package.json           [template]
tsconfig.json          [template]
```

Files marked `[template]` are the same in every demo; see the [demo template](https://www.adaptabletools.com/llms/demo-template.md#vanilla).

**`src/adaptableOptions.ts`**

```ts
import {AdaptableOptions} from '@adaptabletools/adaptable';
import {WebFramework} from './rowData';

export const adaptableOptions: AdaptableOptions<WebFramework> = {
  primaryKey: 'id',
  adaptableId: 'Configuring System Export Destinations',
  exportOptions: {
    systemExportDestinations: ['Clipboard'],
  },
  initialState: {
    Dashboard: {
      Tabs: [
        {
          Name: 'Demo',
          Toolbars: ['Export'],
        },
      ],
    },
    StatusBar: {
      StatusBars: [
        {
          Key: 'Center Panel',
          StatusBarPanels: ['Export'],
        },
      ],
    },
    Theme: {CurrentTheme: 'dark'},
    Export: {
      CurrentReport: 'All Data',
      CurrentFormat: 'CSV',
    },
    Layout: {
      CurrentLayout: 'Standard Layout',
      Layouts: [
        {
          TableColumns: [
            'name',
            'language',
            'github_stars',
            'license',
            'has_projects',
            'has_pages',
            'created_at',
            'has_wiki',
            'updated_at',
            'pushed_at',
            'github_watchers',
            'week_issue_change',
          ],
          Name: 'Standard Layout',
          AutoSizeColumns: true,
        },
      ],
    },
  },
};
```

## Custom Export Destinations

If the System Export Destinations provided by AdapTable are insufficient, developers can easily supply their own custom export destinations.

See the [Guide to creating Custom Export Destinations](https://www.adaptabletools.com/docs/handbook-exporting-destinations-custom/index.md) for more information
