ExportApi
Provides run-time access to the Export Module and Report state
export interfaceMethods
| Method | Returns | Description |
|---|---|---|
| addScheduledReport(reportSchedule) | void | Adds a scheduled report |
| applyScheduledReport(reportSchedule) | void | Runs a scheduled export and records the job-run action |
| canExportToCsv() | boolean | If this AdapTable instance can to export to CSV; if false, the Export to Csv option will not be visible |
| canExportToExcel() | boolean | If this AdapTable instance can to export to Excel; if false, the Export to Excel option will not be visible |
| clearFormat() | void | Sets the Report Format to null |
| clearReport() | void | Sets the Report to null |
| deleteScheduledReport(reportSchedule) | void | Deletes a scheduled report |
| editScheduledReport(reportSchedule) | void | Edits a scheduled report |
| ensureScheduledReportUuids() | void | Ensures 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 | undefined | Retrieves currently selected Report in Adaptable State |
| getCurrentReportFormat() | ReportFormatType | undefined | Retrieves name of currently selected Report |
| getCurrentReportName() | ReportNameType | undefined | Retrieves name of currently selected Report |
| getCustomReports() | Report[] | Retrieves all Custom Reports that have been created by the User |
| getDestinationByName(destinationName) | SystemExportDestination|CustomDestination | undefined | Retrieves Destination with the given name |
| getExportDestinationForm(destinationName) | AdaptableForm<ExportFormContext> | undefined | Form Data entered by the User in the UI for a Custom Destination |
| getExportState() | ExportState | Retrieves Export section from Adaptable State |
| getReportById(id) | Report | Retrieves Report by Id |
| getReportByName(reportName) | Report | undefined | Retrieves 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 | undefined | Retrieves 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) | boolean | Returns whether the given column is exportable |
| isExportDestinationSystem(destinationName) | boolean | If the given destination is a System one |
| openExportSettingsPanel() | void | Open Settings Panel with Export section selected |
| selectFormat(reportFormat) | void | Selects the Report Format for Export |
| selectReport(reportName) | void | Selects the Report in the Adaptable State |
| suspendScheduledReport(reportSchedule) | void | Suspends a scheduled report |
| unSuspendScheduledReport(reportSchedule) | void | Unsuspends a scheduled report |
| updateReport(report) | Report | Updates an existing report |
| updateReports(reports) | Report[] | Updates existing reports |
Method Details
addScheduledReport
Adds a scheduled report
addScheduledReport(reportSchedule: ReportSchedule): void;Parameters
| Parameter | Type |
|---|---|
| reportSchedule | ReportSchedule |
Returns
void
applyScheduledReport
Runs a scheduled export and records the job-run action
applyScheduledReport(reportSchedule: ReportSchedule): void;Parameters
| Parameter | Type |
|---|---|
| reportSchedule | ReportSchedule |
Returns
void
canExportToCsv
If this AdapTable instance can to export to CSV; if false, the Export to Csv option will not be visible
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
canExportToExcel(): boolean;Returns
boolean
clearFormat
Sets the Report Format to null
clearFormat(): void;Returns
void
clearReport
Sets the Report to null
clearReport(): void;Returns
void
deleteScheduledReport
Deletes a scheduled report
deleteScheduledReport(reportSchedule: ReportSchedule): void;Parameters
| Parameter | Type |
|---|---|
| reportSchedule | ReportSchedule |
Returns
void
editScheduledReport
Edits a scheduled report
editScheduledReport(reportSchedule: ReportSchedule): void;Parameters
| Parameter | Type |
|---|---|
| reportSchedule | ReportSchedule |
Returns
void
ensureScheduledReportUuids
Ensures every scheduled report has a unique Uuid (legacy state may omit them).
ensureScheduledReportUuids(): void;Returns
void
exportReport
Exports the Report with the given Name and Format to the given Destination
exportReport(reportName: ReportNameType, format: ReportFormatType, destination?: ExportDestinationType, exportConfig?: ExportConfig): Promise<void>;Parameters
| Parameter | Type | Description |
|---|---|---|
| reportName | ReportNameType | name of the report |
| format | ReportFormatType | format of the report |
| destination | ExportDestinationType | destination to export to |
| exportConfig | ExportConfig | optional export configuration |
Returns
Promise<void>
getActiveScheduledReports
All active scheduled reports (custom reports and system reports)
getActiveScheduledReports(config?: LayoutExtendedConfig): ReportSchedule[];Parameters
| Parameter | Type |
|---|---|
| config | LayoutExtendedConfig |
Returns
getAllExportDestinations
Retrieves the available export destinations
getAllExportDestinations(): ExportDestinationType[];Returns
getAllFormats
Retrieves all Report Formats that are available
getAllFormats(): ReportFormatType[];Returns
getAllReports
Retrieves all available Reports - System and User-created Reports
getAllReports(): Report[];Returns
Report[]
getAvailableCustomDestinations
Retrieves available Custom Destinations (configured in Export Options)
getAvailableCustomDestinations(): CustomDestination[];Returns
getAvailableSystemDestinations
Retrieves available System Export Destinations (configured in Export Options)
getAvailableSystemDestinations(): SystemExportDestination[];Returns
getAvailableSystemFormats
Retrieves available System Report Formats (configured in Export Options)
getAvailableSystemFormats(): SystemReportFormat[];Returns
getAvailableSystemReports
Retrieves available System Reports (configured in Export Options)
getAvailableSystemReports(): SystemReportName[];Returns
getCurrentReport
Retrieves currently selected Report in Adaptable State
getCurrentReport(): Report | undefined;Returns
Report | undefined
getCurrentReportFormat
Retrieves name of currently selected Report
getCurrentReportFormat(): ReportFormatType | undefined;Returns
ReportFormatType | undefined
getCurrentReportName
Retrieves name of currently selected Report
getCurrentReportName(): ReportNameType | undefined;Returns
ReportNameType | undefined
getCustomReports
Retrieves all Custom Reports that have been created by the User
getCustomReports(): Report[];Returns
Report[]
getDestinationByName
Retrieves Destination with the given name
getDestinationByName(destinationName: ExportDestinationType): SystemExportDestination | CustomDestination | undefined;Parameters
| Parameter | Type | Description |
|---|---|---|
| destinationName | ExportDestinationType | destination to retrieve |
Returns
SystemExportDestination|CustomDestination | undefined
getExportDestinationForm
Form Data entered by the User in the UI for a Custom Destination
getExportDestinationForm(destinationName: ExportDestinationType): AdaptableForm<ExportFormContext> | undefined;Parameters
| Parameter | Type |
|---|---|
| destinationName | ExportDestinationType |
Returns
AdaptableForm<ExportFormContext> | undefined
getExportState
Retrieves Export section from Adaptable State
getExportState(): ExportState;Returns
getReportById
Retrieves Report by Id
getReportById(id: Report['Uuid']): Report;Parameters
| Parameter | Type | Description |
|---|---|---|
| id | Report['Uuid'] | report id |
Returns
getReportByName
Retrieves Report with the given name
getReportByName(reportName: ReportNameType): Report | undefined;Parameters
| Parameter | Type | Description |
|---|---|---|
| reportName | ReportNameType | report to retrieve |
Returns
Report | undefined
getReportData
Gets the data for the Report with the given Name in the given Format
getReportData(reportName: ReportNameType, format: ReportFormatType, config?: {
exportParams?: (defaultExportParams: CustomExportParams) => CustomExportParams;
showProgressIndicator?: boolean;
}): Promise<ExportResultData>;Parameters
| Parameter | Type | Description |
|---|---|---|
| reportName | ReportNameType | name of the report |
| format | ReportFormatType | format of the report |
| config | \{ exportParams?: (defaultExportParams:CustomExportParams) =>CustomExportParams; showProgressIndicator?: boolean; \} | optional configuration |
Returns
Promise<ExportResultData>
getScheduledReportById
Retrieves a scheduled report by its Uuid
getScheduledReportById(reportScheduleId: ReportSchedule['Uuid'], config?: LayoutExtendedConfig): ReportSchedule | undefined;Parameters
| Parameter | Type |
|---|---|
| reportScheduleId | ReportSchedule['Uuid'] |
| config | LayoutExtendedConfig |
Returns
ReportSchedule | undefined
getScheduledReports
All scheduled reports (custom reports and system reports)
getScheduledReports(config?: LayoutExtendedConfig): ReportSchedule[];Parameters
| Parameter | Type |
|---|---|
| config | LayoutExtendedConfig |
Returns
getSupportedExportDestinations
Retrieves the Export Destinations that are supported for the given Report Format
getSupportedExportDestinations(reportFormat: ReportFormatType): ExportDestinationType[];Parameters
| Parameter | Type | Description |
|---|---|---|
| reportFormat | ReportFormatType | report format to check |
Returns
isColumnExportable
Returns whether the given column is exportable
isColumnExportable(adaptablColumn: AdaptableColumn): boolean;Parameters
| Parameter | Type |
|---|---|
| adaptablColumn | AdaptableColumn |
Returns
boolean
isExportDestinationSystem
If the given destination is a System one
isExportDestinationSystem(destinationName: ExportDestinationType): boolean;Parameters
| Parameter | Type |
|---|---|
| destinationName | ExportDestinationType |
Returns
boolean
openExportSettingsPanel
Open Settings Panel with Export section selected
openExportSettingsPanel(): void;Returns
void
selectFormat
Selects the Report Format for Export
selectFormat(reportFormat: ReportFormatType | null): void;Parameters
| Parameter | Type |
|---|---|
| reportFormat | ReportFormatType | null |
Returns
void
selectReport
Selects the Report in the Adaptable State
selectReport(reportName: ReportNameType | null): void;Parameters
| Parameter | Type | Description |
|---|---|---|
| reportName | ReportNameType | null | name of Report to select |
Returns
void
suspendScheduledReport
Suspends a scheduled report
suspendScheduledReport(reportSchedule: ReportSchedule): void;Parameters
| Parameter | Type |
|---|---|
| reportSchedule | ReportSchedule |
Returns
void
unSuspendScheduledReport
Unsuspends a scheduled report
unSuspendScheduledReport(reportSchedule: ReportSchedule): void;Parameters
| Parameter | Type |
|---|---|
| reportSchedule | ReportSchedule |
Returns
void
updateReport
Updates an existing report
updateReport(report: Report): Report;Parameters
| Parameter | Type | Description |
|---|---|---|
| report | Report | report to edit |
Returns
updateReports
Updates existing reports
updateReports(reports: Report[]): Report[];Parameters
| Parameter | Type |
|---|---|
| reports | Report[] |
Returns
Report[]