ExportApi

Provides run-time access to the Export Module and Report state

TypeScript
export interface

Methods

MethodReturnsDescription
addScheduledReport(reportSchedule)voidAdds a scheduled report
applyScheduledReport(reportSchedule)voidRuns a scheduled export and records the job-run action
canExportToCsv()booleanIf this AdapTable instance can to export to CSV; if false, the Export to Csv option will not be visible
canExportToExcel()booleanIf this AdapTable instance can to export to Excel; if false, the Export to Excel option will not be visible
clearFormat()voidSets the Report Format to null
clearReport()voidSets the Report to null
deleteScheduledReport(reportSchedule)voidDeletes a scheduled report
editScheduledReport(reportSchedule)voidEdits a scheduled report
ensureScheduledReportUuids()voidEnsures every scheduled report has a unique Uuid (legacy state may omit them).
exportReport(reportName, format, destination, exportConfig)Promise<void>Exports the Report with the given Name and Format to the given Destination
getActiveScheduledReports(config)ReportSchedule[]All active scheduled reports (custom reports and system reports)
getAllExportDestinations()ExportDestinationType[]Retrieves the available export destinations
getAllFormats()ReportFormatType[]Retrieves all Report Formats that are available
getAllReports()Report[]Retrieves all available Reports - System and User-created Reports
getAvailableCustomDestinations()CustomDestination[]Retrieves available Custom Destinations (configured in Export Options)
getAvailableSystemDestinations()SystemExportDestination[]Retrieves available System Export Destinations (configured in Export Options)
getAvailableSystemFormats()SystemReportFormat[]Retrieves available System Report Formats (configured in Export Options)
getAvailableSystemReports()SystemReportName[]Retrieves available System Reports (configured in Export Options)
getCurrentReport()Report | undefinedRetrieves currently selected Report in Adaptable State
getCurrentReportFormat()ReportFormatType | undefinedRetrieves name of currently selected Report
getCurrentReportName()ReportNameType | undefinedRetrieves name of currently selected Report
getCustomReports()Report[]Retrieves all Custom Reports that have been created by the User
getDestinationByName(destinationName)SystemExportDestination|CustomDestination | undefinedRetrieves Destination with the given name
getExportDestinationForm(destinationName)AdaptableForm<ExportFormContext> | undefinedForm Data entered by the User in the UI for a Custom Destination
getExportState()ExportStateRetrieves Export section from Adaptable State
getReportById(id)ReportRetrieves Report by Id
getReportByName(reportName)Report | undefinedRetrieves Report with the given name
getReportData(reportName, format, config)Promise<ExportResultData>Gets the data for the Report with the given Name in the given Format
getScheduledReportById(reportScheduleId, config)ReportSchedule | undefinedRetrieves a scheduled report by its Uuid
getScheduledReports(config)ReportSchedule[]All scheduled reports (custom reports and system reports)
getSupportedExportDestinations(reportFormat)ExportDestinationType[]Retrieves the Export Destinations that are supported for the given Report Format
isColumnExportable(adaptablColumn)booleanReturns whether the given column is exportable
isExportDestinationSystem(destinationName)booleanIf the given destination is a System one
openExportSettingsPanel()voidOpen Settings Panel with Export section selected
selectFormat(reportFormat)voidSelects the Report Format for Export
selectReport(reportName)voidSelects the Report in the Adaptable State
suspendScheduledReport(reportSchedule)voidSuspends a scheduled report
unSuspendScheduledReport(reportSchedule)voidUnsuspends a scheduled report
updateReport(report)ReportUpdates an existing report
updateReports(reports)Report[]Updates existing reports

Method Details

addScheduledReport

Adds a scheduled report

TypeScript
addScheduledReport(reportSchedule: ReportSchedule): void;
Parameters
ParameterType
reportScheduleReportSchedule
Returns

void

applyScheduledReport

Runs a scheduled export and records the job-run action

TypeScript
applyScheduledReport(reportSchedule: ReportSchedule): void;
Parameters
ParameterType
reportScheduleReportSchedule
Returns

void

canExportToCsv

If this AdapTable instance can to export to CSV; if false, the Export to Csv option will not be visible

TypeScript
canExportToCsv(): boolean;
Returns

boolean

canExportToExcel

If this AdapTable instance can to export to Excel; if false, the Export to Excel option will not be visible

TypeScript
canExportToExcel(): boolean;
Returns

boolean

clearFormat

Sets the Report Format to null

TypeScript
clearFormat(): void;
Returns

void

clearReport

Sets the Report to null

TypeScript
clearReport(): void;
Returns

void

deleteScheduledReport

Deletes a scheduled report

TypeScript
deleteScheduledReport(reportSchedule: ReportSchedule): void;
Parameters
ParameterType
reportScheduleReportSchedule
Returns

void

editScheduledReport

Edits a scheduled report

TypeScript
editScheduledReport(reportSchedule: ReportSchedule): void;
Parameters
ParameterType
reportScheduleReportSchedule
Returns

void

ensureScheduledReportUuids

Ensures every scheduled report has a unique Uuid (legacy state may omit them).

TypeScript
ensureScheduledReportUuids(): void;
Returns

void

exportReport

Exports the Report with the given Name and Format to the given Destination

TypeScript
exportReport(reportName: ReportNameType, format: ReportFormatType, destination?: ExportDestinationType, exportConfig?: ExportConfig): Promise<void>;
Parameters
ParameterTypeDescription
reportNameReportNameTypename of the report
formatReportFormatTypeformat of the report
destinationExportDestinationTypedestination to export to
exportConfigExportConfigoptional export configuration
Returns

Promise<void>

getActiveScheduledReports

All active scheduled reports (custom reports and system reports)

TypeScript
getActiveScheduledReports(config?: LayoutExtendedConfig): ReportSchedule[];
Parameters
ParameterType
configLayoutExtendedConfig
Returns

ReportSchedule[]

getAllExportDestinations

Retrieves the available export destinations

TypeScript
getAllExportDestinations(): ExportDestinationType[];
Returns

ExportDestinationType[]

getAllFormats

Retrieves all Report Formats that are available

TypeScript
getAllFormats(): ReportFormatType[];
Returns

ReportFormatType[]

getAllReports

Retrieves all available Reports - System and User-created Reports

TypeScript
getAllReports(): Report[];
Returns

Report[]

getAvailableCustomDestinations

Retrieves available Custom Destinations (configured in Export Options)

TypeScript
getAvailableCustomDestinations(): CustomDestination[];
Returns

CustomDestination[]

getAvailableSystemDestinations

Retrieves available System Export Destinations (configured in Export Options)

TypeScript
getAvailableSystemDestinations(): SystemExportDestination[];
Returns

SystemExportDestination[]

getAvailableSystemFormats

Retrieves available System Report Formats (configured in Export Options)

TypeScript
getAvailableSystemFormats(): SystemReportFormat[];
Returns

SystemReportFormat[]

getAvailableSystemReports

Retrieves available System Reports (configured in Export Options)

TypeScript
getAvailableSystemReports(): SystemReportName[];
Returns

SystemReportName[]

getCurrentReport

Retrieves currently selected Report in Adaptable State

TypeScript
getCurrentReport(): Report | undefined;
Returns

Report | undefined

getCurrentReportFormat

Retrieves name of currently selected Report

TypeScript
getCurrentReportFormat(): ReportFormatType | undefined;
Returns

ReportFormatType | undefined

getCurrentReportName

Retrieves name of currently selected Report

TypeScript
getCurrentReportName(): ReportNameType | undefined;
Returns

ReportNameType | undefined

getCustomReports

Retrieves all Custom Reports that have been created by the User

TypeScript
getCustomReports(): Report[];
Returns

Report[]

getDestinationByName

Retrieves Destination with the given name

TypeScript
getDestinationByName(destinationName: ExportDestinationType): SystemExportDestination | CustomDestination | undefined;
Parameters
ParameterTypeDescription
destinationNameExportDestinationTypedestination to retrieve
Returns

SystemExportDestination|CustomDestination | undefined

getExportDestinationForm

Form Data entered by the User in the UI for a Custom Destination

TypeScript
getExportDestinationForm(destinationName: ExportDestinationType): AdaptableForm<ExportFormContext> | undefined;
Parameters
ParameterType
destinationNameExportDestinationType
Returns

AdaptableForm<ExportFormContext> | undefined

getExportState

Retrieves Export section from Adaptable State

TypeScript
getExportState(): ExportState;
Returns

ExportState

getReportById

Retrieves Report by Id

TypeScript
getReportById(id: Report['Uuid']): Report;
Parameters
ParameterTypeDescription
idReport['Uuid']report id
Returns

Report

getReportByName

Retrieves Report with the given name

TypeScript
getReportByName(reportName: ReportNameType): Report | undefined;
Parameters
ParameterTypeDescription
reportNameReportNameTypereport to retrieve
Returns

Report | undefined

getReportData

Gets the data for the Report with the given Name in the given Format

TypeScript
getReportData(reportName: ReportNameType, format: ReportFormatType, config?: {
        exportParams?: (defaultExportParams: CustomExportParams) => CustomExportParams;
        showProgressIndicator?: boolean;
    }): Promise<ExportResultData>;
Parameters
ParameterTypeDescription
reportNameReportNameTypename of the report
formatReportFormatTypeformat of the report
config\{ exportParams?: (defaultExportParams:CustomExportParams) =>CustomExportParams; showProgressIndicator?: boolean; \}optional configuration
Returns

Promise<ExportResultData>

getScheduledReportById

Retrieves a scheduled report by its Uuid

TypeScript
getScheduledReportById(reportScheduleId: ReportSchedule['Uuid'], config?: LayoutExtendedConfig): ReportSchedule | undefined;
Parameters
ParameterType
reportScheduleIdReportSchedule['Uuid']
configLayoutExtendedConfig
Returns

ReportSchedule | undefined

getScheduledReports

All scheduled reports (custom reports and system reports)

TypeScript
getScheduledReports(config?: LayoutExtendedConfig): ReportSchedule[];
Parameters
ParameterType
configLayoutExtendedConfig
Returns

ReportSchedule[]

getSupportedExportDestinations

Retrieves the Export Destinations that are supported for the given Report Format

TypeScript
getSupportedExportDestinations(reportFormat: ReportFormatType): ExportDestinationType[];
Parameters
ParameterTypeDescription
reportFormatReportFormatTypereport format to check
Returns

ExportDestinationType[]

isColumnExportable

Returns whether the given column is exportable

TypeScript
isColumnExportable(adaptablColumn: AdaptableColumn): boolean;
Parameters
ParameterType
adaptablColumnAdaptableColumn
Returns

boolean

isExportDestinationSystem

If the given destination is a System one

TypeScript
isExportDestinationSystem(destinationName: ExportDestinationType): boolean;
Parameters
ParameterType
destinationNameExportDestinationType
Returns

boolean

openExportSettingsPanel

Open Settings Panel with Export section selected

TypeScript
openExportSettingsPanel(): void;
Returns

void

selectFormat

Selects the Report Format for Export

TypeScript
selectFormat(reportFormat: ReportFormatType | null): void;
Parameters
ParameterType
reportFormatReportFormatType | null
Returns

void

selectReport

Selects the Report in the Adaptable State

TypeScript
selectReport(reportName: ReportNameType | null): void;
Parameters
ParameterTypeDescription
reportNameReportNameType | nullname of Report to select
Returns

void

suspendScheduledReport

Suspends a scheduled report

TypeScript
suspendScheduledReport(reportSchedule: ReportSchedule): void;
Parameters
ParameterType
reportScheduleReportSchedule
Returns

void

unSuspendScheduledReport

Unsuspends a scheduled report

TypeScript
unSuspendScheduledReport(reportSchedule: ReportSchedule): void;
Parameters
ParameterType
reportScheduleReportSchedule
Returns

void

updateReport

Updates an existing report

TypeScript
updateReport(report: Report): Report;
Parameters
ParameterTypeDescription
reportReportreport to edit
Returns

Report

updateReports

Updates existing reports

TypeScript
updateReports(reports: Report[]): Report[];
Parameters
ParameterType
reportsReport[]
Returns

Report[]