Parameters | Return Value | Response Model |
---|---|---|
getReportsList() | Promise | Array<ReportsListItem> |
Copy Code
|
|
---|---|
type ReportsListItem = { _id: string, // report id Name: string, // report name IsCpl: boolean, // specifies whether report is RDL or FPL Type: 'PageReport', // RESERVED - for now only 'PageReport' is supported $effectivePermissions: 'All', // RESERVED - for now only 'All' is supported } |
Parameters | Return Value | Response Model |
---|---|---|
getReportContent(options: GetReportContentOptions) | Promise | Report JSON Model |
Copy Code
|
|
---|---|
type GetReportContentOptions { id: string, // report id version: null, // RESERVED - for now only null is supported } |
Parameters | Return Value | Response Model |
---|---|---|
getReportRevisions(options: GetReportRevisionsOptions) | Promise | Array<ReportRevision> |
Copy Code
|
|
---|---|
type GetReportRevisionsOptions { id: string, // report id } |
Copy Code
|
|
---|---|
type ReportRevision = { _id: string, // report id Name: string, // report name IsCpl: boolean, // specifies whether report is RDL or FPL Type: 'PageReport', // RESERVED - for now only 'PageReport' is supported $effectivePermissions: 'All', // RESERVED - for now only 'All' is supported } |
Parameters | Return Value | Response Model |
---|---|---|
saveNewReport(options: SaveNewReportOptions) | Promise | SaveReportResponse |
Copy Code
|
|
---|---|
type SaveNewReportOptions = { name: string, // report name content: object, // report JSON model } |
Copy Code
|
|
---|---|
type SaveReportResponse = { Id: string, // saved report id } |
Parameters | Return Value | Response Model |
---|---|---|
saveExistingReport(options: SaveExistingReportOptions) | Promise | SaveReportResponse |
Copy Code
|
|
---|---|
type SaveExistingReportOptions = { id: string, // report id content: object, // report JSON model } |
Parameters | Return Value | Response Model |
---|---|---|
saveTemporaryReport(options: SaveTemporaryReportOptions) | Promise | SaveReportResponse |
Copy Code
|
|
---|---|
type SaveTemporaryReportOptions = { name: string, // report name content: object, // report JSON model } |
This is an optional service function that is used outside of Designer. It can be used for deleting temporary reports when Report Viewer is closed and view is switched back to Designer.
Parameters | Return Value | Response Model |
---|---|---|
deleteTemporaryReport(options: DeleteTemporaryReportOptions) | Promise | DeleteReportResponse |
Copy Code
|
|
---|---|
type DeleteTemporaryReportOptions = { id: string, // report id } |
Copy Code
|
|
---|---|
type DeleteReportResponse = { Id: string, // deleted report id } |
Parameters | Return Value | Response Model |
---|---|---|
getDataSetsList() | Promise | Array<DataSetsListItem> |
Copy Code
|
|
---|---|
type DataSetsListItem = { id: string, // data set id name: string, // data set name version: null, // RESERVED - for now only null is supported } |
Parameters | Return Value | Response Model |
---|---|---|
getDataSourcesAndDataSets(options: GetDataSourcesAndDataSetsOptions) | Promise | GetDataSourcesAndDataSetsResponse |
Parameters | Return Value | Response Model |
---|---|---|
canEditDataSource(options: CanEditDataSourceOptions) | Promise | GetDataSourcesAndDataSetsResponse |
Copy Code
|
|
---|---|
type CanEditDataSourceOptions = { /** data source */ dataSource: DataSource; /** data provider of data source */ dataProvider: string; }; |
Parameters | Return Value | Response Model |
---|---|---|
canAddDataSetForDataSource(options: CanAddDataSetForDataSourceOptions)) | Promise | GetDataSourcesAndDataSetsResponse |
Copy Code
|
|
---|---|
type CanAddDataSetForDataSourceOptions = { /** data source */ dataSource: DataSource; /** data provider of data source */ dataProvider: string; }; |
WHETHER A DATA SET CAN BE EDITED
Parameters | Return Value | Response Model |
---|---|---|
canEditDataSet:(options: CanEditDataSetOptions) | Promise | GetDataSourcesAndDataSetsResponse |
GET EDITDATASET OPTIONS OBJECT
Copy Code
|
|
---|---|
type CanEditDataSetOptions = { /** data set */ dataSet: DataSet; /** data provider of data set's parent data source */ dataProvider: string; }; |
RETURNS A DATA SET INITIALIZED FOR A SPECIFIC DATA SOURCE
Parameters | Return Value | Response Model |
---|---|---|
initDataSetForDataSource:(options: InitDataSetForDataSourceOptions) | Promise |
GetDataSourcesAndDataSetsResponse |
GET INITDATASETFORDATASOURCE OPTIONS OBJECT
Copy Code
|
|
---|---|
type InitDataSetForDataSourceOptions = { /** data source */ dataSource: DataSource; /** data provider of data source */ dataProvider: string; /** data set name to be initialized */ dataSetName: string; }; |
GET PROPERTIES AVAILABLE FOR A SPECIFIC DATA SET
Parameters | Return Value | Response Model |
---|---|---|
getDataSetProperties:(options: GetDataSetPropertiesOptions) | Promise |
GetDataSourcesAndDataSetsResponse |
GET GETDATASETPROPERTIES OPTIONS OBJECT
Copy Code
|
|
---|---|
type GetDataSetPropertiesOptions = { /** data provider of data set's parent data source */ dataProvider: string; }; |
GET GETDATASETPROPERTIES RESPONSE OBJECT
Copy Code
|
|
---|---|
type DataSetProperty = 'name' | 'commandType' | 'query' | 'fields' | 'calculatedFields' | 'parameters' | 'filters' | 'caseSensitivity' | 'collation' | 'kanatypeSensitivity' | 'widthSensitivity' | 'accentSensitivity'; |
GET SCHEMA FOR A SPECIFIC DATA SET
Parameters | Return Value | Response Model |
---|---|---|
getDataSetSchema(options: GetDataSetSchemaOptions) | Promise |
GetDataSourcesAndDataSetsResponse |
GET GETDATASETSCHEMA OPTIONS OBJECT
Copy Code
|
|
---|---|
type GetDataSetSchemaOptions = { /** data set */ dataSet: DataSet; /** data set's parent data source */ dataSource: DataSource; }; |
GET GETDATASETSCHEMA RESPONSE OBJECT
Copy Code
|
|
---|---|
type GetDataSetSchemaResponse = { /** data set fields */ fields: Array<Field>; /** data set query parameters */ parameters: Array<QueryParameter>; }; |
GET DATA SOURCES AND DATA SETS
Parameters | Return Value | Response Model |
---|---|---|
getDataSourcesAndDataSets(options: GetDataSourcesAndDataSetsOptions) |
Promise |
GetDataSourcesAndDataSetsResponse |
GET DATA SOURCES AND DATA SETS OPTIONS OBJECT
Copy Code
|
|
---|---|
type GetDataSourcesAndDataSetsOptions = { dataSetInfo: { id: string, // data set id name: string, // data set name version: null, // RESERVED - for now only null is supported }, dataSourceInfo: object, // RESERVED reportDataSets: Array<DataSet>, // data sets used in report reportDataSources: Array<DataSource>, // data sources used in report } |
GET DATA SOURCES AND DATA SETS RESPONSE OBJECT
Copy Code
|
|
---|---|
type GetDataSourcesAndDataSetsResponse = { dataSources: Array<DataSource>, dataSets: Array<DataSet>, } |
****
This function is intended to be used in getDataSourcesAndDataSets(). The result dataSetContent object may store information required to create a data set and its parent data source.
Parameters | Return Value | Response Model |
---|---|---|
getDataSetContent(options: GetDataSetContentOptions) | Promise | dataSetContent: object |
Copy Code
|
|
---|---|
type GetDataSetContentOptions = { id: string, // data set id } |
Basic properties of DataSource and DataSet types are listed. Object models of DataSource and DataSet correlate with their structure in RDLX report definition.
Copy Code
|
|
---|---|
type DataSource = { Name: string, // data source name ConnectionProperties: { ConnectString: string, // connection string DataProvider: string, // data provider - see AR Documentation }, // ... more properties - see AR Documentation } type DataSet = { Name: string, // data set name Fields: Array<Field>, // data set fields Query: { DataSourceName: string, // parent data source name CommandType: 'Text' | 'StoredProcedure', // query command type CommandText: string, // query command text QueryParameters: Array<QueryParameter>, } // ... more properties - see AR Documentation } type Field = { Name: string, // field name // Either DataField or Value needs to be available. DataField?: string, // data field name - valid for bound fields Value?: string, // field value - valid for calculated fields /* Extra optional properties */ // default field aggregate - see AR Documentation for more available aggregates Aggregate?: 'Count' | 'Sum' | 'Max' | 'Min' /* etc. */, // field data type DataType?: 'String' | 'Integer' | 'Float' | 'Number' | 'Boolean' | 'DateTime', } type QueryParameter = { Name: string, // query parameter name Value: string, // query parameter value } |
Copy Code
|
|
---|---|
/* Optional: Add/Edit Data Sources using Data Source Editor */ var openDataSourceEditorImpl = function (options) { ARDataSourceEditor.open(makeOptions(options, { serverApi: { testConnection: baseServerApi.testDataSourceConnection, }, })); }; |
Copy Code
|
|
---|---|
export type CanEditDataSourceOptions = { /** data source */ dataSource: DataSource; /** data provider of data source */ dataProvider: string; }; export type CanEditDataSetOptions = { /** data set */ dataSet: DataSet; /** data provider of data set's parent data source */ dataProvider: string; }; |
Copy Code
|
|
---|---|
export type InitDataSetForDataSourceOptions = { /** data source */ dataSource: DataSource; /** data provider of data source */ dataProvider: string; /** data set name to be initialized */ dataSetName: string; }; |
Copy Code
|
|
---|---|
export type GetDataSetPropertiesOptions = { /** data provider of data set's parent data source */ dataProvider: string; }; export type DataSetProperty = 'name' | 'commandType' | 'query' | 'fields' | 'calculatedFields' | 'parameters' | 'filters' | 'caseSensitivity' | 'collation' | 'kanatypeSensitivity' | 'widthSensitivity' | 'accentSensitivity'; |
Copy Code
|
|
---|---|
export type GetDataSetSchemaOptions = { /** data set */ dataSet: DataSet; /** data set's parent data source */ dataSource: DataSource; }; |
Copy Code
|
|
---|---|
export type GetDataSetSchemaResponse = { /** data set fields */ fields: Array; /** data set query parameters */ parameters: Array; }; |
Copy Code
|
|
---|---|
export type OpenDataSourceEditorBaseOptions = { /** locale passed by Designer */ locale: 'en' | 'ja' | 'zh'; /** **Non-null** if an existing data source edited, **null** - if a new one is created. */ dataSource: DataSource | null; /** data sources used in report */ reportDataSources: Array; /** callback on successful data source editing/creation */ onSuccess: (options: DataSourceEditorOnSuccessOptions) => void; /** callback on closing Data Source Editor */ onClose: () => void; }; |
Copy Code
|
|
---|---|
export type DataSourceEditorOnSuccessOptions = {
/** successfully created or edited data source */
dataSource: DataSource;
};
|
Copy Code
|
|
---|---|
export type OpenDataSetPickerBaseOptions = { /** locale passed by Designer */ locale: 'en' | 'ja' | 'zh'; /** If mode is **Panel**, Data Set Picker is rendered within **Data** tab. */ mode: DataSetPickerMode; /** If mode is not **Panel**, Data Set Picker is rendered to an element with this id. */ elementId?: string; /** data sources used in report */ reportDataSources: Array; /** data sets used in report */ reportDataSets: Array; /** New data sources and data sets to be added are passed as parameters to this function. */ addDataSourcesAndDataSets: (options: AddDataSourcesAndDataSetsOptions) => void; /** callback on closing Data Set Picker */ onClose: () => void; }; |
Copy Code
|
|
---|---|
export type DataSetPickerMode = 'Panel' | 'Dialog'; |
Copy Code
|
|
---|---|
export type AddDataSourcesAndDataSetsOptions = { /** data sources to-be-added */ dataSources: Array; /** data sets to-be-added */ dataSets: Array; }; |
Copy Code
|
|
---|---|
export type CanAddDataSetForDataSourceOptions = { /** data source */ dataSource: DataSource; /** data provider of data source */ dataProvider: string; }; |
Copy Code
|
|
---|---|
/** * Type of **ARDataSourceEditor** object exported by **ar-datasource-editor.js** module. */ export type DataSourceEditorApi = { /* Initializes **Data Source Editor** using the specified **DataSourceEditorInitOptions** object and renders it to ** element with id **dataSourceEditorElementId**. * * **Example:** * ```javascript * ARDataSourceEditor.init('data-source-editor-id', dataSourceEditorInitOptions); * ``` * * @param dataSourceEditorElementId string * @param options DataSourceEditorInitOptions object */ init: (dataSourceEditorElementId: string, options?: DataSourceEditorInitOptions) => void; /** * Opens Data Source Editor. * * **Example:** * ```javascript * ARDataSourceEditor.open(dataSourceEditorOptions); * ``` * * @param options DataSourceEditorOptions object */ open: (options: DataSourceEditorOptions) => void; }; export type CustomProviderDescriptor = { /** * key - data provider identifier\ * This value is used for **DataSource.ConnectionProperties.DataProvider** property. */ key: string; /** * name - data provider label\ * This value is used as a friendly data provider label in UI. */ name: string; }; export type DataSourceEditorInitOptions = { /** predefined providers */ predefinedProviders?: Array; /** OLE DB providers */ oleDbProviders?: Array; /** custom providers */ customProviders?: Array; }; export type PredefinedProvider = 'SQL' | 'OLEDB' | 'ODBC' | 'JSON' | 'CSV' | 'XML'; export type OleDbProvider = PredefinedOleDbProvider | string; export type PredefinedOleDbProvider = 'Microsoft.Jet.OLEDB.4.0' | 'SQLOLEDB.1' | 'MSDataShape.1' | 'MSDASQL.1'; export type DataSourceEditorOptions = OpenDataSourceEditorBaseOptions & { /** Specifies custom localization data. */ localeData?: Array; |
Copy Code
|
|
---|---|
/** **Data Source Editor** server API */ serverApi: { /** * Tests data source connection. * * @param options TestConnectionOptions object */ testConnection: (options: TestConnectionOptions) => Promise; }; }; export type TestConnectionOptions = { /** data source */ dataSource: DataSource; }; export type TestConnectionResponse = { /** error code - 0 means success */ Code: number; /** databases list available for test connection settings */ Databases: Array | null, /** error message */ Error: string | null, }; |
Parameters | Return Value | Response Model |
---|---|---|
getThemesList() | Promise | Array<ThemesListItem> |
Copy Code
|
|
---|---|
type ThemesListItem = { _id: string, // theme id Name: string, // theme name IsDefault: boolean, // specifies whether theme is default or not, only a single theme can be default Dark1: string, // Dark1 theme color Dark2: string, // Dark2 theme color Light1: string, // Light1 theme color Light2: string, // Light2 theme color Accent1: string, // Accent1 theme color Accent2: string, // Accent2 theme color Accent3: string, // Accent3 theme color Accent4: string, // Accent4 theme color Accent5: string, // Accent5 theme color Accent6: string, // Accent6 theme color MajorFontFamily: string, // Major text theme font family MinorFontFamily: string, // Minor text theme font family } |
Parameters | Return Value | Response Model |
---|---|---|
getThemeContent(options: GetThemeContentOptions) | Promise | ThemeModel |
Copy Code
|
|
---|---|
type GetThemeContentOptions = { id: string, // theme id } |
Copy Code
|
|
---|---|
type ThemeModel = { Colors: { Dark1: string, // Dark1 theme color Dark2: string, // Dark2 theme color Light1: string, // Light1 theme color Light2: string, // Light2 theme color Accent1: string, // Accent1 theme color Accent2: string, // Accent2 theme color Accent3: string, // Accent3 theme color Accent4: string, // Accent4 theme color Accent5: string, // Accent5 theme color Accent6: string, // Accent6 theme color Hyperlink: string, // Hyperlink theme color HyperlinkFollowed: string, // Followed hyperlink theme color }, Fonts: { MajorFont: ThemeFont, MinorFont: ThemeFont, } Images: Array<ThemeImage>, Constants: Array<ThemeConstant>, } type ThemeFont = { Family: string, // font family Style: string, // font style Size: string, // font size Weight: string, // font weight } type ThemeImage = { Name: string, // image name MIMEType: string, // image MIME type ImageData: string, // Base64 image data } type ThemeConstant = { Key: string, // constant key Value: string, // constant value } |
Parameters | Return Value | Response Model |
---|---|---|
getImagesList() | Promise | Array<ImagesListItem> |
Copy Code
|
|
---|---|
type ImagesListItem = { _id: string, // image id Name: string, // image name MimeType: string, // image MIME type Thumbnail: null, // RESERVED - for now only null is supported } |
This url is used to display external image in design-time.
Parameters | Return Value |
---|---|
getImageUrl(options: GetImageUrlOptions) | imageUrl: string |
Copy Code
|
|
---|---|
type GetImageUrlOptions = { id: string, // image id } |
This function can be used in some custom File View implementation.
Parameters | Return Value | Response Model |
---|---|---|
getTemplatesList() | Promise | Array<TemplatesListItem> |
Copy Code
|
|
---|---|
type TemplatesListItem = { _id: string, // template id Name: string, // template name } |
Parameters | Return Value | Response Model |
---|---|---|
getTemplateContent(options: GetTemplateContentOptions) | Promise | Report JSON Model |
Copy Code
|
|
---|---|
type GetTemplateContentOptions = { id: string, // template id } |
This function can be used in some custom File View implementation.
Parameters | Return Value | Response Model |
---|---|---|
getTemplateThumbnail(options: GetTemplateThumbnailOptions) | Promise | base64ImageData: string |
Copy Code
|
|
---|---|
type GetTemplateThumbnailOptions = { id: string, // template id } |
This function creates a resource (report/image/theme) link to be stored in RDLX report definition. The Resource links are then resolved while rendering report. These links need to be correct for successful report preview.
Parameters | Return Value |
---|---|
createResourceLink(options: ResourceLinkOptions) | resourceLink: string |
Copy Code
|
|
---|---|
type ResourceLinkOptions = { id: string, // resource id type: 'report' | 'image' | 'theme' | null, // resource type version: null, // RESERVED - for now only null is supported } |
The opposite operation to createResourceLink().
Parameters | Return Value |
---|---|
parseResourceLink(resourceLink: string) | ResourceLinkOptions |
This function can be used to update Designer url when a new or an existing report editing is started.
Parameters | Return Value |
---|---|
updateRoute(options: UpdateRouteOptions) | void |
Copy Code
|
|
---|---|
type UpdateRouteOptions = { id: string, // report id version: null, // RESERVED - for now only null is supported } |