[]
ActiveReports provides a rich API for integrating the web designer components into your web application. Use this API to embed the WebDesigner component in your project. It lets you create, design, and save reports with added capabilities that include - defining the locale for the designer, customizing the default settings of the report items, managing the Data and Properties tab, modifying the application info, and much more. You will find the usage examples for ES, UMD, and TypeScript modules.
The main object exported by WebDesigner ES Module is described below.
Description: Renders the WebDesigner component to the <div> element with given selector using the specified DesignerSettings object.
Parameter (Type):
selector: string
settings: DesignerSettings
Return Type: Promise<DesignerAPI>
Required: Yes
import { arWebDesigner } from './web-designer.js';
import { createViewer } from './jsViewer.min.js';
let viewer = null;
arWebDesigner.create('#ar-web-designer', {
rpx: { enabled: true },
appBar: { openButton: { visible: true } },
data: { dataSets: { canModify: true }, dataSources: { canModify: true } },
preview: {
openViewer: (options) => {
if (viewer) {
viewer.openReport(options.documentInfo.id);
return;
}
viewer = createViewer({
element: '#' + options.element,
reportService: {
url: 'api/reporting',
},
reportID: options.documentInfo.id,
settings: {
zoomType: 'FitPage'
}
});
}
}
});
Description: Returns the DesignerAPI of the previously created instance of the WebDesigner component.
Parameter (Type):
instanceId: string
Return Type: DesignerAPI
Required: Yes
import { arWebDesigner } from './web-designer.js';
const designer = arWebDesigner.apiOf('ar-web-designer');
Description: Adds language resources for all instances of WebDesigner.
Parameter (Type):
lng: string
resources: [ResourceBundle]
Return Type: void
Required: Yes
import { arWebDesigner } from './web-designer.js';
arWebDesigner.addLanguage('en', [
{
"ns": "app",
"lng": "en",
"resources": {
"textAppTitleCompact": "",
}
},
]);
Description: Destroys Designer application.
Parameter (Type):
selector: string (the Designer container selector)
instanceId: string (use only if Designer was created using DesignerSettings.instanceId)
Return Type: void
Required: Yes
import { arWebDesigner } from './web-designer.js';
arWebDesigner.create('#container-1', { ...settings, instanceId: 'instance-1' });
arWebDesigner.destroy('#container-1', 'instance-1');
Description: The predefined themes object exported by WebDesigner ESM module.
Description: The type of predefined themes object, with keys as theme names.
type ColorThemesType = {
default: ColorTheme,
defaultDark: ColorTheme,
darkOled: ColorTheme,
highContrast: ColorTheme,
highContrastDark: ColorTheme
};
Description: Type Shades definition.
type Shades = {
veryLight: string;
light: string;
lighter: string;
lightMedium: string;
medium: string;
base: string;
darkMedium: string;
darker: string;
dark: string;
veryDark: string;
};
Description: Type Color definition.
type Color = string | Shades;
Description: Type ColorTheme definition.
export type ColorTheme = {
name: string;
type: 'light' | 'dark';
backgroundMain: string;
backgroundPanels: string;
primary: Color;
secondary: Color;
neutral: Color;
error: Color;
warning: Color;
fontFamily: string
};
Type of GrapeCity.ActiveReports.Designer object exported by the web-designer.js module.
Description: Renders the WebDesigner component to the <div> element with given selector using the specified DesignerSettings object.
Parameter (Type):
selector: string
settings: DesignerSettings
Return Type: Promise<DesignerAPI>
Required: Yes
<html>
<head>
<title>ActiveReports WebDesigner</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta http-equiv="x-ua-compatible" content="ie=edge">
<link rel="stylesheet" href="vendor/css/bootstrap.css" />
<link rel="stylesheet" href="vendor/css/fonts-googleapis.css" type="text/css">
<!-- Optional. Resets the browser's default style, which allows the web designer to occupy the whole page. -->
<style>
html, body { width: 100%; height: 100%; margin: 0; padding: 0 }
</style>
<!-- Required for the ActiveReports Web Viewer -->
<link rel="stylesheet" href="jsViewer.min.css" />
<link rel="stylesheet" href="web-designer.css" />
</head>
<body>
<!-- Required for the ActiveReports Web Viewer -->
<script src="jsViewer.min.js"></script>
<script src="web-designer.js"></script>
<!-- Important! Designer requires a defined size or a container to fill -->
<div id="ar-web-designer" style="width: 100%; height: 100%;"></div>
<script>
/* Required for the ActiveReports Web Viewer */
var viewer = null;
GrapeCity.ActiveReports.Designer.create('#ar-web-designer', {
appBar: {
saveButton: { visible: false },
saveAsButton: { visible: false }
},
data: {
dataSets: { canModify: true },
dataSources: { canModify: true }
},
server: {
url: 'api'
},
preview: {
/* Required for the ActiveReports Web Viewer */
openViewer: ({ element, documentInfo: { id: documentId } }) => {
if (viewer) {
viewer.openReport(documentId);
return;
}
viewer = GrapeCity.ActiveReports.JSViewer.create({
element: '#' + element,
reportID: documentId,
renderFormat: options.preferredFormat || 'html',
reportService: {
url: 'api/reporting'
},
settings: {
zoomType: 'FitPage'
}
});
}
}
});
</script>
</body>
</html>
Description: Returns the DesignerAPI of the previously created instance of the WebDesigner component.
Parameter (Type):
instanceId: string
Return Type: DesignerAPI | undefined
Required: Yes
const designer = GrapeCity.ActiveReports.Designer.apiOf('ar-web-designer');
Description: Adds language resources for all instances of WebDesigner.
Parameter (Type):
lng: string
resources: [ResourceBundle]
Return Type: void
Required: Yes
GrapeCity.ActiveReports.Designer.addLanguage('en', [
{
"ns": "app",
"lng": "en",
"resources": {
"textAppTitleCompact": "",
}
},
]);
Description: Destroys Designer application.
Parameter (Type):
selector: string (the Designer container selector)
instanceId: string (Optional, use only if Designer was created using DesignerSettings.instanceId)
Return Type: void
Required: Yes
GrapeCity.ActiveReports.Designer.create('#container-1', { settings, instanceId: 'instance-1' });
GrapeCity.ActiveReports.Designer.destroy('#container-1', 'instance-1');
GrapeCity.ActiveReports.Designer.create('#container-2', settings);
GrapeCity.ActiveReports.Designer.destroy('#container-2');
Localization resource for a specific locale.
Description: Refers to the bundle language.
Return Type: string
Required: Yes
Description: Refers to the bundle namespace.
Return Type: string
Required: Yes
Description: Refers to the localization resources.
Return Type: Record<string, any>
Required: Yes
Type of object returned by functions from the GlobalDesignerAPI.
Description: Contains application-related information.
Required: Yes
Description: Contains designer-related documentation links.
Required: Yes
general
Description: Refers to the general documentation.
Return Type: { text: string; url: string }
Required: Yes
transformation
Description: Refers to the report items transformation information.
Return Type: { text (optional): string; url: string }
Required: Yes
ES MODULE
import { arWebDesigner } from './web-designer.js';
arWebDesigner.create('#ar-web-designer', {
rpx: { enabled: true },
appBar: { openButton: { visible: true } }
}).then((designer) => {
designer.app.about.help.general.text = 'help text';
designer.app.about.help.general.url = 'http://myurl';
});
UMD MODULE
GrapeCity.ActiveReports.Designer.create('#ar-web-designer', {
rpx: { enabled: true },
appBar: { openButton: { visible: true } }
}).then((designer) => {
designer.app.about.help.general.text = 'help text';
designer.app.about.help.general.url = 'http://myurl';
});
TYPESCRIPT MODULE
GrapeCity.ActiveReports.Designer.create('#ar-web-designer', {
rpx: { enabled: true },
appBar: { openButton: { visible: true } }
}).then((designer: DesignerAPI) => {
designer.app.about.help.general.text = 'help text';
designer.app.about.help.general.url = 'http://myurl';
});
Description: Specifies the application title for the WebDesigner component.
Return Type: string
Required: Yes
ES MODULE
import { arWebDesigner } from './web-designer.js';
arWebDesigner.create('#ar-web-designer', {
rpx: { enabled: true },
appBar: { openButton: { visible: true } }
}).then((designer) => {
designer.app.about.applicationTitle = 'Title text';
});
UMD MODULE
GrapeCity.ActiveReports.Designer.create('#ar-web-designer', {
rpx: { enabled: true },
appBar: { openButton: { visible: true } }
}).then((designer) => {
designer.app.about.applicationTitle = 'Title text';
});
TYPESCRIPT MODULE
GrapeCity.ActiveReports.Designer.create('#ar-web-designer', {
rpx: { enabled: true },
appBar: { openButton: { visible: true } }
}).then((designer: DesignerAPI) => {
designer.app.about.applicationTitle = 'Title text';
});
Description: Specifies the compact version of the application title for the WebDesigner component.
Return Type: string
Required: Yes
ES MODULE
import { arWebDesigner } from './web-designer.js';
arWebDesigner.create('#ar-web-designer', {
rpx: { enabled: true },
appBar: { openButton: { visible: true } }
}).then((designer) => {
designer.app.about.applicationTitleCompact = 'Example text';
});
UMD MODULE
GrapeCity.ActiveReports.Designer.create('#ar-web-designer', {
rpx: { enabled: true },
appBar: { openButton: { visible: true } }
}).then((designer) => {
designer.app.about.applicationTitleCompact = 'Example text';
});
TYPESCRIPT MODULE
GrapeCity.ActiveReports.Designer.create('#ar-web-designer', {
rpx: { enabled: true },
appBar: { openButton: { visible: true } }
}).then((designer: DesignerAPI) => {
designer.app.about.applicationTitleCompact = 'Example text';
});
Description: Specifies the application version for the WebDesigner component.
Return Type: string
Required: Yes
Description: Refers to the WebDesigner Core version an application is based on.
Return Type: string
Required: Yes
ES MODULE
import { arWebDesigner } from './web-designer.js';
arWebDesigner.create('#ar-web-designer', {
rpx: { enabled: true },
appBar: { openButton: { visible: true } }
}).then((designer) => {
designer.app.about.coreVersion = '1.2.3';
designer.app.about.applicationVersion = '3.4.5';
});
UMD MODULE
GrapeCity.ActiveReports.Designer.create('#ar-web-designer', {
rpx: { enabled: true },
appBar: { openButton: { visible: true } }
}).then((designer) => {
designer.app.about.coreVersion = '1.2.3';
designer.app.about.applicationVersion = '3.4.5';
});
TYPESCRIPT MODULE
GrapeCity.ActiveReports.Designer.create('#ar-web-designer', {
rpx: { enabled: true },
appBar: { openButton: { visible: true } }
}).then((designer: DesignerAPI) => {
designer.app.about.coreVersion = '1.2.3';
designer.app.about.applicationVersion = '3.4.5';
});
Description: Returns focus to the WebDesigner component. Focus may be lost when plugged-in or external components are opened or closed. Returning focus is essential to continue using designer hotkeys like Ctrl+Z (undo), Ctrl+Y (redo), etc.
Return Type: void
Required: Yes
ES MODULE
import { arWebDesigner } from './web-designer.js';
arWebDesigner.create('#ar-web-designer', {
rpx: { enabled: true },
appBar: { openButton: { visible: true } }
}).then((designer) => {
designer.app.focus();
});
UMD MODULE
GrapeCity.ActiveReports.Designer.create('#ar-web-designer', {
rpx: { enabled: true },
appBar: { openButton: { visible: true } }
}).then((designer) => {
designer.app.focus();
});
TYPESCRIPT MODULE
GrapeCity.ActiveReports.Designer.create('#ar-web-designer', {
rpx: { enabled: true },
appBar: { openButton: { visible: true } }
}).then((designer: DesignerAPI) => {
designer.app.focus();
});
Description: Information about the availability of common actions with the report and selected items
Required: Yes
The flags indicate whether the editor is able to perform the corresponding action. The Return Type of these flags is 'boolean'. The actions indicate action associated with the flag. The Return Type of these actions is 'void'.
Flag | Action |
---|---|
canUndo() | undo() |
canRedo() | Redo() |
canCut() | Cut() |
canPaste() | Paste() |
canCopy() | Copy() |
canDelete() | Delete() |
See the following section for html usage of setting flags and the corresponding action to take.
ES MODULE
import { arWebDesigner } from './web-designer.js';
const designer = arWebDesigner.apiOf('ar-web-designer');
if (designer.app.editor.canUndo) designer.app.editor.undo();
UMD MODULE
const designer = GrapeCity.ActiveReports.Designer.apiOf('ar-web-designer');
if (designer.app.editor.canUndo) designer.app.editor.undo();
TYPESCRIPT MODULE
const designer = GrapeCity.ActiveReports.Designer.apiOf('ar-web-designer');
if (designer.app.editor.canUndo) designer.app.editor.undo();
ES MODULE
import { arWebDesigner } from './web-designer.js';
const designer = arWebDesigner.apiOf('ar-web-designer');
if (designer.app.editor.canRedo) designer.app.editor.redo();
UMD MODULE
const designer = GrapeCity.ActiveReports.Designer.apiOf('ar-web-designer');
if (designer.app.editor.canRedo) designer.app.editor.redo();
TYPESCRIPT MODULE
const designer = GrapeCity.ActiveReports.Designer.apiOf('ar-web-designer');
if (designer.app.editor.canRedo) designer.app.editor.redo();
ES MODULE
import { arWebDesigner } from './web-designer.js';
const designer = arWebDesigner.apiOf('ar-web-designer');
if (designer.app.editor.canCut) designer.app.editor.cut();
UMD MODULE
const designer = GrapeCity.ActiveReports.Designer.apiOf('ar-web-designer');
if (designer.app.editor.canCut) designer.app.editor.cut();
TYPESCRIPT MODULE
const designer = GrapeCity.ActiveReports.Designer.apiOf('ar-web-designer');
if (designer.app.editor.canCut) designer.app.editor.cut();
ES MODULE
import { arWebDesigner } from './web-designer.js';
const designer = arWebDesigner.apiOf('ar-web-designer');
if (designer.app.editor.canCopy) designer.app.editor.copy();
UMD MODULE
const designer = GrapeCity.ActiveReports.Designer.apiOf('ar-web-designer');
if (designer.app.editor.canCopy) designer.app.editor.copy();
TYPESCRIPT MODULE
const designer = GrapeCity.ActiveReports.Designer.apiOf('ar-web-designer');
if (designer.app.editor.canCopy) designer.app.editor.copy();
ES MODULE
import { arWebDesigner } from './web-designer.js';
const designer = arWebDesigner.apiOf('ar-web-designer');
if (designer.app.editor.canPaste) designer.app.editor.paste();
UMD MODULE
const designer = GrapeCity.ActiveReports.Designer.apiOf('ar-web-designer');
if (designer.app.editor.canPaste) designer.app.editor.paste();
TYPESCRIPT MODULE
const designer = GrapeCity.ActiveReports.Designer.apiOf('ar-web-designer');
if (designer.app.editor.canPaste) designer.app.editor.paste();
ES MODULE
import { arWebDesigner } from './web-designer.js';
const designer = arWebDesigner.apiOf('ar-web-designer');
if (designer.app.editor.canDelete) designer.app.editor.delete();
UMD MODULE
const designer = GrapeCity.ActiveReports.Designer.apiOf('ar-web-designer');
if (designer.app.editor.canDelete) designer.app.editor.delete();
TYPESCRIPT MODULE
const designer = GrapeCity.ActiveReports.Designer.apiOf('ar-web-designer');
if (designer.app.editor.canDelete) designer.app.editor.delete();
Description: Contains access to the menu and sidebar panels. It contains following objects: menu and sidebar.
Description: Menu API.
Parameter Type:
id: string
Return Type: void
Return Type: void
Return Type: void
ES MODULE
import { arWebDesigner } from './web-designer.js';
const designer = arWebDesigner.apiOf('ar-web-designer');
designer.app.panels.menu.open('document-explorer');
UMD MODULE
const designer = GrapeCity.ActiveReports.Designer.apiOf('ar-web-designer');
designer.app.panels.menu.open('document-explorer');
TYPESCRIPT MODULE
const designer = GrapeCity.ActiveReports.Designer.apiOf('ar-web-designer');
designer.app.panels.menu.open('document-explorer');
Description: Sidebar API.
Parameter Type:
id: string
Return Type: void
Return Type: void
ES MODULE
import { arWebDesigner } from './web-designer.js';
const designer = arWebDesigner.apiOf('ar-web-designer');
designer.app.panels.sidebar.open('propsTab');
UMD MODULE
const designer = GrapeCity.ActiveReports.Designer.apiOf('ar-web-designer');
designer.app.panels.sidebar.open('propsTab');
TYPESCRIPT MODULE
const designer = GrapeCity.ActiveReports.Designer.apiOf('ar-web-designer');
designer.app.panels.sidebar.open('propsTab');
Description: This object includes functions allowing you to create, open, save reports, and more.
Return Type: DocumentsAPI
Required: Yes
Description: Allows to utilize the built-in notifications system in the WebDesigner component.
Return Type: NotificationsAPI
Required: Yes
API to create, edit, open, or save report, to fetch information on unsaved reports, and more.
Description: Indicates whether the report has unsaved changes.
Return Type: boolean
Required: Yes
ES MODULE
import { arWebDesigner } from './web-designer.js';
const designer = arWebDesigner.apiOf('ar-web-designer');
const val = designer.documents.hasUnsavedChanges(); if (val) console.log('Currently edited report has unsaved changes.');
UMD MODULE
const designer = GrapeCity.ActiveReports.Designer.apiOf('ar-web-designer');
const val = designer.documents.hasUnsavedChanges();
if (val) console.log('Currently edited report has unsaved changes.');
TYPESCRIPT MODULE
const designer = GrapeCity.ActiveReports.Designer.apiOf('ar-web-designer');
const val = designer.documents.hasUnsavedChanges();
if (val) console.log('Currently edited report has unsaved changes.');
Description: Indicates whether the report was saved at least once.
Return Type: boolean
Required: Yes
ES MODULE
import { arWebDesigner } from './web-designer.js';
const designer = arWebDesigner.apiOf('ar-web-designer');
const val = designer.documents.isNew();
if (val) console.log('New document');
UMD MODULE
const designer = GrapeCity.ActiveReports.Designer.apiOf('ar-web-designer');
const val = designer.documents.isNew();
if (val) console.log('New document');
TYPESCRIPT MODULE
const designer = GrapeCity.ActiveReports.Designer.apiOf('ar-web-designer');
const val = designer.documents.isNew();
if (val) console.log('New document');
Description: Returns information about the currently edited report in the WebDesigner component.
Return Type: CurrentDocumentInfo
Required: Yes
ES MODULE
import { arWebDesigner } from './web-designer.js';
const designer = arWebDesigner.apiOf('ar-web-designer');
var reportInfo = designer.documents.info();
console.log(`Report "${reportInfo.name}" is currently edited.`);
UMD MODULE
const designer = GrapeCity.ActiveReports.Designer.apiOf('ar-web-designer');
var reportInfo = designer.documents.info();
console.log(`Report "${reportInfo.name}" is currently edited.`);
TYPESCRIPT MODULE
const designer = GrapeCity.ActiveReports.Designer.apiOf('ar-web-designer');
var reportInfo = designer.documents.info();
console.log(`Report "${reportInfo.name}" is currently edited.`);
Description: Creates a new report to be edited in the WebDesigner component using the specified CreateReportOptions object.
Parameter (Type):
Return Type: Promise<CreateDocumentInfo>
Required: Yes
ES MODULE
import { arWebDesigner } from './web-designer.js';
const designer = arWebDesigner.apiOf('ar-web-designer');
var reportInfo = designer.documents.create().then(function() {
console.log('An empty RDLX report is created.'); });
UMD MODULE
const designer = GrapeCity.ActiveReports.Designer.apiOf('ar-web-designer');
var reportInfo = designer.documents.create().then(function() {
console.log('An empty RDLX report is created.');
});
TYPESCRIPT MODULE
const designer = GrapeCity.ActiveReports.Designer.apiOf('ar-web-designer');
var reportInfo = designer.documents.create().then(() => {
console.log('An empty RDLX report is created.');
});
Description: Shows the Open Report dialog box in the WebDesigner component.
Return Type: void
Required: Yes
ES MODULE
import { arWebDesigner } from './web-designer.js';
var api = arWebDesigner.apiOf('designer-id');
api.documents.open();
UMD MODULE
var api = GrapeCity.ActiveReports.Designer.apiOf('designer-id');
api.documents.open();
TYPESCRIPT MODULE
var api = GrapeCity.ActiveReports.Designer.apiOf('designer-id');
api.documents.open();
Description: Opens an existing report to be edited in the WebDesigner component with a specified id. Optionally, you can pass the report name and content, else it will be loaded from the server.
Parameter (Type):
id: string
type: SupportedDocumentType
name (optional): string
content (optional): any
Return Type: Promise<OpenDocumentInfo>
Required: Yes
ES MODULE
import { arWebDesigner } from './web-designer.js';
var api = arWebDesigner.apiOf('designer-id');
api.documents.openById('MyReport.rdlx', { platform: 'rdlx', type: 'report', subType: 'msl'}).then(() => {
console.log('An existing report "MyReport.rdlx" is opened.');
});
var reportContent = { Width: '6.5in', ReportSections: [{ Type: 'Continuous' as any, Name: 'ContinuousSection1', Body: { ReportItems: [ {Type: 'textbox', Name: 'TextBox1', Width: '5in', Height: '1in' } ] }}]};
api.documents.openById('NewReport.rdlx', { platform: 'rdlx', type: 'report', subType: 'msl'}, 'NewReport', reportContent).then(() => {
console.log('New report with one textbox created and opened.');
});
UMD MODULE
var api = GrapeCity.ActiveReports.Designer.apiOf('designer-id');
api.documents.openById('MyReport.rdlx', { platform: 'rdlx', type: 'report', subType: 'msl'}).then(() => {
console.log('An existing report "MyReport.rdlx" is opened.');
});
var reportContent = { Width: '6.5in', ReportSections: [{ Type: 'Continuous' as any, Name: 'ContinuousSection1', Body: { ReportItems: [ {Type: 'textbox', Name: 'TextBox1', Width: '5in', Height: '1in' } ] }}]};
api.documents.openById('NewReport.rdlx', { platform: 'rdlx', type: 'report', subType: 'msl'}, 'NewReport', reportContent).then(() => {
console.log('New report with one textbox created and opened.');
});
TYPESCRIPT MODULE
const api = GrapeCity.ActiveReports.Designer.apiOf('designer-id');
api.documents.openById('MyReport.rdlx', { platform: 'rdlx', type: 'report', subType: 'msl'}).then(() => {
console.log('An existing report "MyReport.rdlx" is opened.');
});
const reportContent = { Width: '6.5in', ReportSections: [{ Type: 'Continuous' as any, Name: 'ContinuousSection1', Body: { ReportItems: [ {Type: 'textbox', Name: 'TextBox1', Width: '5in', Height: '1in' } ] }}]};
api.documents.openById('NewReport.rdlx', { platform: 'rdlx', type: 'report', subType: 'msl'}, 'NewReport', reportContent).then(() => {
console.log('New report with one textbox created and opened.');
});
Description: Saves the currently edited report in the WebDesigner component. If the report is new, then the Save As dialog box will be opened.
Return Type: void
Required: Yes
ES MODULE
import { arWebDesigner } from './web-designer.js';
var api = arWebDesigner.apiOf('designer-id');
api.documents.save();
UMD MODULE
var api = GrapeCity.ActiveReports.Designer.apiOf('designer-id');
api.documents.save();
TYPESCRIPT MODULE
var api = GrapeCity.ActiveReports.Designer.apiOf('designer-id');
api.documents.save();
Description: Opens the Save As dialog box in the WebDesigner component.
Return Type: void
Required: Yes
ES MODULE
import { arWebDesigner } from './web-designer.js';
var api = arWebDesigner.apiOf('designer-id');
api.documents.saveAs();
UMD MODULE
var api = GrapeCity.ActiveReports.Designer.apiOf('designer-id');
api.documents.saveAs();
TYPESCRIPT MODULE
var api = GrapeCity.ActiveReports.Designer.apiOf('designer-id');
api.documents.saveAs();
Description: Saves the currently edited report in the WebDesigner component using the specified id.
Parameter (Type):
Return Type: Promise<SaveDocumentInfo>
Required: Yes
ES MODULE
import { arWebDesigner } from './web-designer.js';
var api = arWebDesigner.apiOf('designer-id');
api.documents.saveById('MyReport.rdlx');
UMD MODULE
var api = GrapeCity.ActiveReports.Designer.apiOf('designer-id');
api.documents.saveById('MyReport.rdlx');
TYPESCRIPT MODULE
var api = GrapeCity.ActiveReports.Designer.apiOf('designer-id');
api.documents.saveById('MyReport.rdlx');
Description: Saves the report currently edited in the WebDesigner component using the specified name.
Parameter (Type):
name: string
Return Type: Promise<SaveDocumentInfo>
Required: Yes
ES MODULE
import { arWebDesigner } from './web-designer.js';
var api = arWebDesigner.apiOf('designer-id');
api.documents.saveByName('MyReport.rdlx');
UMD MODULE
var api = GrapeCity.ActiveReports.Designer.apiOf('designer-id');
api.documents.saveByName('MyReport.rdlx');
TYPESCRIPT MODULE
var api = GrapeCity.ActiveReports.Designer.apiOf('designer-id');
api.documents.saveByName('MyReport.rdlx');
Section Report (.rpx) document type.
type RpxReportDocumentType = { platform: 'rpx'; type: 'report' };
Page Report (.rdlx) document type.
type RdlxFplReportDocumentType = { platform: 'rdlx'; type: 'report'; subType: 'fpl'};
RDLX Multi-Section (.rdlx) document type.
type RdlxMslReportDocumentType = { platform: 'rdlx'; type: 'report'; subType: 'msl'};
RDLX Dashboard (.rdlx) document type.
type RdlxMslDashboardDocumentType = { platform: 'rdlx'; type: 'report'; subType: 'msl'};
RDLX report (.rdlx) document type.
type RdlxMasterMultiReportDocumentType = { platform: 'rdlx'; type: 'master'; subType: 'msl'};
RDLX, Page, RDLX Multi-Section, or RDLX Dashboard document type.
RdlxFplReportDocumentType | RdlxMslReportDocumentType | RdlxMslDashboardDocumentType | RdlxMasterMultiReportDocumentType;
Type of documents supported by the WebDesigner component.
RpxReportDocumentType | RdlxReportDocumentType;
API for notifications for a user action, error, warning, and more.
Description: Sends a notification of the specified level, including caption and content.
Parameter (Type):
level: 'info' | 'warning' | 'error'
caption: string
content (optional): string
Return Type: void
Required: Yes
ES MODULE
import { arWebDesigner } from './web-designer.js';
arWebDesigner.create('#ar-web-designer', {
storeUnsavedReport: false
}).then((api) => {
api.notifications.send('info', 'My information');
});
UMD MODULE
const designer = GrapeCity.ActiveReports.Designer.create('#ar-web-designer', {
storeUnsavedReport: false
}).then((api) => {
api.notifications.send('info', 'My information');
});
TYPESCRIPT MODULE
var designer: DesignerAPI = GrapeCity.ActiveReports.Designer.create('#ar-web-designer', {
storeUnsavedReport: false
}).then((api: DesignerAPI) => {
api.notifications.send('info', 'My information');
});
Description: Sends a general notification, which can be used to notify when any user-initiated action is complete.
Parameter (Type):
caption: string
text (optional): string
Return Type: void
Required: Yes
ES MODULE
import { arWebDesigner } from './web-designer.js';
arWebDesigner.create('#ar-web-designer', {
storeUnsavedReport: false
}).then((api) => {
api.notifications.info('Notification');
});
UMD MODULE
const designer = GrapeCity.ActiveReports.Designer.create('#ar-web-designer', {
storeUnsavedReport: false
}).then((api) => {
api.notifications.info('Notification');
});
TYPESCRIPT MODULE
var designer: DesignerAPI = GrapeCity.ActiveReports.Designer.create('#ar-web-designer', {
storeUnsavedReport: false
}).then((api: DesignerAPI) => {
api.notifications.info('Notification');
});
Description: Sends an error notification.
Parameter (Type):
caption: string
errorText (optional): string
Return Type: void
Required: Yes
ES MODULE
import { arWebDesigner } from './web-designer.js';
arWebDesigner.create('#ar-web-designer', {
storeUnsavedReport: false
}).then((api) => {
api.notifications.error("Application error");
});
UMD MODULE
const designer = GrapeCity.ActiveReports.Designer.create('#ar-web-designer', {
storeUnsavedReport: false
}).then((api) => {
api.notifications.error("Application error");
});
TYPESCRIPT MODULE
var designer: DesignerAPI = GrapeCity.ActiveReports.Designer.create('#ar-web-designer', {
storeUnsavedReport: false
}).then((api: DesignerAPI) => {
api.notifications.error("Application error");
});
Description: Sends a warning notification.
Parameter (Type):
caption: string
warningText (optional): string
Return Type: void
Required: Yes
ES MODULE
import { arWebDesigner } from './web-designer.js';
arWebDesigner.create('#ar-web-designer', {
storeUnsavedReport: false
}).then((api) => {
api.notifications.warning('Warning');
});
UMD MODULE
const designer = GrapeCity.ActiveReports.Designer.create('#ar-web-designer', {
storeUnsavedReport: false
}).then((api) => {
api.notifications.warning('Warning');
});
TYPESCRIPT MODULE
var designer: DesignerAPI = GrapeCity.ActiveReports.Designer.create('#ar-web-designer', {
storeUnsavedReport: false
}).then((api: DesignerAPI) => {
api.notifications.warning('Warning');
});
Description: Dismisses all notifications.
Return Type: void
Required: Yes
ES MODULE
import { arWebDesigner } from './web-designer.js';
arWebDesigner.create('#ar-web-designer', {
storeUnsavedReport: false
}).then((api) => {
api.notifications.dismissAll();
});
UMD MODULE
const designer = GrapeCity.ActiveReports.Designer.create('#ar-web-designer', {
storeUnsavedReport: false
}).then((api) => {
api.notifications.dismissAll();
});
TYPESCRIPT MODULE
const designer = GrapeCity.ActiveReports.Designer.apiOf('ar-web-designer');
designer.notifications.dismissAll();
Return Type: string
Required: Yes
Return Type: string
Required: Yes
Return Type: string
Required: Yes
Locale object from date-fns.
Return Type: string
Required: Yes
Return Type: any
Required: Yes
Return Type: any
Required: Yes
Return Type: any
Required: Yes
Return Type: any
Required: Yes
Return Type: any
Required: Yes
Return Type: any
Required: Optional
Return Type: css
Required: Yes
Return Type: string
Required: Yes
Menu Icon of the WebDesigner component.
MenuCssIcon
API for designer settings.
Description: Indicates the unique identifier for the WebDesigner instance. This is required if there are multiple instances of the WebDesigner on the same page.
Return Type: string
Required: Yes
const designer = GrapeCity.ActiveReports.Designer.apiOf('ar-web-designer');
Description: Specifies the language to use for the WebDesigner component. If language is not specified, browser preferences are used. The localization is available in following languages:
'en-US’, ‘ja-JP’, and 'zh-CN'. The default value for this property is set to 'en-US'.
designerSettings.language = 'zh-CN';
Return Type: string
Required: Yes
Description: Specifies the list of fonts displayed in the Font editors all over the WebDesigner component, and supports plain strings, label-value pairs, headers, and splitters. If fonts are not specified explicitly here, the default list of fonts is used:
'Arial', 'Arial Black', 'Comic Sans MS', 'Courier New', 'Geneva', 'Georgia', 'Helvetica', 'Impact', 'Lucida Console', 'Meiryo', 'Meiryo UI', 'MingLiU', 'MingLiU-ExtB', 'MS Gothic', 'MS Mincho', 'MS PGothic', 'MS PMincho', 'MS Song', 'MS UI Gothic', 'NSimSun', 'Osaka', 'PMingLiU', 'PMingLiU-ExtB', 'SimSun', 'SimSun-ExtB', 'Song', 'Tahoma', 'Times New Roman', 'Trebuchet MS', 'Verdana', and 'Yu Gothic'.
Return Type: (string | Font | FontHeader)[]
Required: Yes
GrapeCity.ActiveReports.Designer.create('#ar-web-designer', {
fonts: [{ header: 'Questionable Choice' }, { label: 'Pretty Font', value: 'Comic Sans MS' }, { header: '' }, 'Arial', 'Courier New', 'Times New Roman']
});
Description: The initial theme to be applied.
Return Type: string
enabled
Description: Shows Theme Picker in the UI, which lists all the available themes. By default, this setting is set to 'true'.
Return Type: boolean
availableThemes
Description: An array of available themes that can be picked by the user. You can use either built-in theme names, or pass the theme object. These themes can be either built-in themes or custom ones. The default theme can be set from any of these: default, defaultDark, darkOled, highContrast, highContrastDark.
Return Type: (string | ColorTheme)[];
ES MODULE
//using custom theme
arWebDesigner.create('#ar-web-designer', {
themes: {
initialTheme: 'testTheme',
themeSelector: {
enabled: false,
availableThemes: ['Default', theme]
}
},
});
//using built-in themes
arWebDesigner.create('#ar-web-designer', {
themes: {
initialTheme: 'defaultDark',
themeSelector: { enabled: false }
},
});
UMD MODULE
//using custom theme
GrapeCity.ActiveReports.Designer.create('#ar-web-designer', {
themes: {
initialTheme: 'testTheme',
themeSelector: {
enabled: false,
availableThemes: ['Default', theme]
}
}
});
//using built-in themes
GrapeCity.ActiveReports.Designer.create('#ar-web-designer', {
themes: {
initialTheme: 'defaultDark',
themeSelector: { enabled: false }
},
});
TYPESCRIPT MODULE
//using custom theme
GrapeCity.ActiveReports.Designer.create('#ar-web-designer', {
themes: {
initialTheme: 'testTheme',
themeSelector: {
enabled: false,
availableThemes: ['Default', theme]
}
}
});
//using built-in themes
GrapeCity.ActiveReports.Designer.create('#ar-web-designer', {
themes: {
initialTheme: 'defaultDark',
themeSelector: { enabled: false }
},
});
Description: Specifies the list of supported date formats. See Microsoft Documentation for more information on custom date and time format strings.
Return Type: string[]
Required: Yes
GrapeCity.ActiveReports.Designer.create('#ar-web-designer', {
dateFormats = ['yyyy/MM/dd HH:mm:ss', 'yyyy/MM/dd', 'HH:mm:ss', 'tt hh:mm:ss']
});
Description: Specifies the additional locale object from 'date-fns'. Pass it, if you use other locale except en, fr, ja, ko, pl, zhCN, and zhTW.
Return Type: Locale
Required: Optional
Description: Specifies the list of supported image mime-types in the WebDesigner component.
Return Type: string[]
Required: Yes
Description: Specifies the default measurement units for the WebDesigner component. The default unit is inches.
Return Type: 'in' | 'cm'
Required: Optional
GrapeCity.ActiveReports.Designer.create('#ar-web-designer', {
storeUserPreferences: false,
units: 'cm'
});
Description: By default, the lockLayout property is set to 'false'. However, when you set this property to 'true', it enables you to modify the properties of existing report items. Operations that can modify the report layout structure are not possible, such as adding a new report item or deleting an existing one, and others.
Return Type: boolean
Required: Yes
const designer = GrapeCity.ActiveReports.Designer.apiOf('ar-web-designer');
designer.lockLayout = 'true';
Return Type: { id: string; type: SupportedDocumentType; };
Required: Optional
Description: By default, the storeUnsavedReport property is set to 'true'. In this case, the last unsaved report can be restored if the browser tab or browser itself gets accidentally closed. However, if the storeUnsavedReport property is set to 'false', the aforementioned functionality is not available.
Return Type: boolean
Required: Yes
GrapeCity.ActiveReports.Designer.create('#ar-web-designer', {
storeUnsavedReport: false
});
Description: By default, the storeUserPreferences property is set to 'true'. In this case, the user preferences will be saved to the browser storage. However, if the storeUnsavedReport property is set to 'false', the aforementioned functionality is not available.
Return Type: boolean
Required: Yes
GrapeCity.ActiveReports.Designer.create('#ar-web-designer', {
storeUserPreferences: false
});
Description: By default, the disableFocusTimer property is set to 'true'. In such a case, the focused elements (like buttons) are highlighted only for a short period after the Tab key is pressed. However, if the disableFocusTimer property is set to 'false', the focus highlighting timer on the buttons is disabled for better accessibility.
Return Type: boolean
Required: Yes
GrapeCity.ActiveReports.Designer.create('#ar-web-designer', {
disableFocusTimer: true
});
Description: Disable the usage of the system clipboard. Copy-paste between designer instances will work only in the same browser in the same domain.
Return Type: boolean
Required: Yes
GrapeCity.ActiveReports.Designer.create('#ar-web-designer', {
disableSystemClipboard: true
});
Description: Return filtered array of descriptors in the order in which descriptors should be rearranged.
Parameter (Type):
descriptors: PropertyDescriptor[]
item: Record<string, any>
platform: 'rdlx' | 'rpx'
Return Type: PropertyDescriptor[]
Required: Optional
GrapeCity.ActiveReports.Designer.create('#ar-web-designer', {
filterProperties: (descriptors, item, platform) => platform === 'rpx' ? [] : descriptors,
});
Description: Settings available for the Editors in the Web designer component.
Required: Yes
Description: Specifies the ruler settings for the WebDesigner component.
Required: Optional
ES MODULE
import { arWebDesigner } from './web-designer.js';
arWebDesigner.create('#ar-web-designer', {
editor: {
rulers: {
visible: true
}
}
});
UMD MODULE
GrapeCity.ActiveReports.Designer.create('#ar-web-designer', {
editor: {
rulers: {
visible: true
}
}
});
TYPESCRIPT MODULE
GrapeCity.ActiveReports.Designer.create('#ar-web-designer', {
editor: {
rulers: {
visible: true
}
}
});
Description: Specifies whether rulers need to be shown in the WebDesigner component, by default.
Return Type