AdapTable lets users send reports to these destinations:
- Excel (if the right vendor grid modules have been loaded)
However sometimes developers might want to add additional destinations such as particular REST endpoints, or by email. This can be done as follows:
- Add the destination to the CustomDestinations section of Export State
- Provide an implementation of the CustomExportDestinationFunction function in User Functions to be called whenever that destination has been specified
- In that function to provide whatever custom code is required to send the report - the function receives the Report and the Report Data
In this example we have created a Custom Destination called 'Email' and in our dummy function implemenation we simply output the report data to the console.