[]
        
(Showing Draft Content)

Report Designer API

Wyn Enterprise provides a rich API for integrating the reporting components into your web application. To embed the Report Designer component in your project, use the Report Designer API. 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.


The following sections describe the Report Designer API.

Type DesignerOptions

Type of the return value of the GrapeCity.WynReports.Designer.createDesignerOptions() function.

Properties

portalUrl



Description


Refers to Wyn Portal URL.


Type


string


Example


designerOptions.portalUrl = 'https://wyn-portal.com/';


referenceToken (optional)


Description


Refers to the reference key which is required to access the Wyn API.


Type


string


Example


designerOptions.referenceToken = '<referenceToken>';


locale (optional)


Description


Specifies the locale used for displaying the Report Designer component. If the locale value is not specified explicitly here, the locale corresponding to the browser preferences is used.


Type


Locale


Example


designerOptions.locale = 'zh';


units (optional)


Description


Specifies the default measurement units for the Report Designer component. If the measurement units are not specified explicitly here, they are identified depending on the locale.


Type


Units


Example


designerOptions.units = 'cm';


fonts (optional)


Description


Specifies the list of fonts displayed in the Font Family drop-downs all over the Report Designer component. If fonts are not specified explicitly here, the default list of fonts is used.


Type


string[]


Example


designerOptions.fonts = ['Arial', 'Courier New', 'Times New Roman'];


reportItems (optional)


Description


It is possible to limit and/or reorder the available report items in the Report Designer component. Specify comma-separated report items keys from the following: BandedList, Barcode, Bullet, Chart, CheckBox, Container, FormattedText, Image, InputField, Line, List, OverflowPlaceholder, Shape, Sparkline, Subreport, Table, TableOfContents, Tablix, and TextBox.


Type


string


Example


designerOptions.reportItems = 'TextBox,CheckBox,Table,Chart,Image';


reportItemsFeatures


Description


Refers to the customizable report items features in Barcode, Chart, Table, and Tablix report controls.DOC-DETAILS-TAG-OPENDOC-SUMMARY-TAG-OPENbarcode***DOC-SUMMARY-TAG-CLOSE


Description


Settings available for barcodes in the Report Designer component.DOC-DETAILS-TAG-OPENDOC-SUMMARY-TAG-OPENdefaultSymbology (optional)***DOC-SUMMARY-TAG-CLOSE


Description


Overrides the default symbology used for newly-created barcodes. By default, new barcodes are created with QRCode symbology.


Type


BarcodeSymbology


Example


designerOptions.reportItemsFeatures.barcode.defaultSymbology = 'Code_128_A';


symbologies (optional)


Description


Limits the list of barcode symbologies available for creation. By default, all barcode symbologies supported by Wyn Enterprise are available.


Type


BarcodeSymbology[]


Example

designerOptions.reportItemsFeatures.barcode.symbologies = ['Code_128_A', 'Code_128_B', 'Code_128_C'];

chart


Description


Settings available for charts in the Report Designer component.

canUseWizard***


Description


Specifies whether Chart Wizard is available for creating charts in the Report Designer component. By default, this feature is enabled.


Type


boolean


Example


designerOptions.reportItemsFeatures.chart.canUseWizard = false;


table


Description


Settings available for tables in the Report Designer component.

autoFillHeader



Description


Specifies whether Table Header needs to be auto-filled when a field is dropped to the Table Details section. For example, if the ProductName field is dropped to Details, the Product Name value is set to Header. By default, this feature is enabled.


Type


boolean


Example


designerOptions.reportItemsFeatures.table.autoFillHeader = false;


autoFillFooter


Description


Specifies whether Table Footer needs to be auto-filled when a field is dropped to the Table Details section. For example, if ProductName field is dropped to Details, {Count(ProductName)} value is set to Footer. By default, this feature is disabled.


Type


boolean


Example


designerOptions.reportItemsFeatures.table.autoFillFooter = true;


canMergeCellsVertically


Description


Specifies whether vertical merge of cells is enabled within the Table Header, Details, and Footer sections. By default, this feature is enabled.


Type


boolean


Example


designerOptions.reportItemsFeatures.table.canMergeCellsVertically = false;


tablix


Description


Settings available for tablix in the Report Designer component.

autoFillCorner



Description


Specifies whether Tablix Corner cell needs to be auto-filled when a field is dropped to Tablix Row Group cell. For example, if ProductName field is dropped to Row Group cell, Product Name value is set to Corner cell. By default, this feature is enabled.


Type


boolean


Example


designerOptions.reportItemsFeatures.tablix.autoFillCorner = false;


canUseWizard


Description


Specifies whether Tablix Wizard is available for creating or editing Tablix in the Report Designer component. By default, this feature is enabled.


Type


boolean


Example


designerOptions.reportItemsFeatures.tablix.canUseWizard = false;


lockLayout


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.


Type


boolean


Example


designerOptions.lockLayout = true;


restoreUnsavedReport


Description


By default, the restoreUnsavedReport 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 restoreUnsavedReport property is set to false, the aforementioned functionality is not available.


Type


boolean


Example


designerOptions.restoreUnsavedReport = false;


reportInfo


Description


If report id is specified, the corresponding report will be opened in the Report Designer component when the Designer application is rendered.

id (optional)



Description


Specifies the report (or template) id to open in the Report Designer component when the Designer application is rendered.


Type


string | null


Example


designerOptions.reportInfo.id = '6e975775-38e3-4ac5-b92c-0ff7dab091a6';


version (optional)


Description


Lets you specify the exact report (or template) version if not the latest version needs to be opened in the Report Designer component.


Type


number | null


Example


designerOptions.reportInfo.version = 5;


isTemplate (optional)


Description


Specifies whether a report or a template needs to be opened in the Report Designer component.


Type


boolean


Example


designerOptions.isTemplate = true;


aboutInfo


Description


Overrides the default About information in the Report Designer component.


Type


ApplicationInfo & ProductInfo


Example

\\\`\\\`\\\`
designerOptions.aboutInfo.applicationTitle = 'Report Designer';
designerOptions.aboutInfo.applicationTitleCompact = 'Designer';
designerOptions.aboutInfo.productTitle = '';
designerOptions.aboutInfo.productVersion = '1.2.3';
\\\`\\\`\\\`

helpInfos (optional)


Description


Specifies the user-defined Help links to be shown in the About dialog of the Report Designer component.


Type


HelpInfo[]


Example

\\\`\\\`\\\`
designerOptions.helpInfos = [
 { title: 'My Documentation', link: 'https://main-documentation.com/' },
 { link: 'https://other-documentation.com/' },
];
\\\`\\\`\\\`

saveButton


Description


Settings available for the Save button in the Report Designer component.DOC-DETAILS-TAG-OPENDOC-SUMMARY-TAG-OPENvisible***DOC-SUMMARY-TAG-CLOSE


Description


Specifies whether the Save button needs to be shown in the Report Designer component. If the Save button is not visible, then the Save As button will be not visible as well. By default, the Save button is not visible in the Designer component.


Type


boolean


Example


designerOptions.saveButton.visible = false;


saveAsButton


Description


Settings available for the Save As button in the Report Designer component.DOC-DETAILS-TAG-OPENDOC-SUMMARY-TAG-OPENvisible***DOC-SUMMARY-TAG-CLOSE


Description


Specifies whether the Save As button needs to be shown in the Report Designer component. If the Save button is not visible, then the Save As button will be not visible as well. By default, the Save As button is not visible in the Designer component.


Type


boolean


Example


designerOptions.saveAsButton.visible = false;


insertTab


Description


Settings available for the Insert tab in the Report Designer component.DOC-DETAILS-TAG-OPENDOC-SUMMARY-TAG-OPENvisible***DOC-SUMMARY-TAG-CLOSE


Description


Specifies whether the Insert tab needs to be shown in Report Designer's application bar. The Tool Box and Insert tab are interchangeable. By default, the Insert tab is not visible.


Type


boolean


Example


designerOptions.insertTab.visible = true;


reportExplorer


Description


Settings available for the Report Explorer button in the Report Designer component.DOC-DETAILS-TAG-OPENDOC-SUMMARY-TAG-OPENvisible***DOC-SUMMARY-TAG-CLOSE


Description


Specifies whether the Report Explorer button needs to be shown in the Report Designer component. By default, the Report Explorer button is visible.


Type


boolean


Example


designerOptions.reportExplorer.visible = false;


groupEditor


Description


Settings available for the Group Editor button in the Report Designer component.DOC-DETAILS-TAG-OPENDOC-SUMMARY-TAG-OPENvisible***DOC-SUMMARY-TAG-CLOSE


Description


Specifies whether the Group Editor button needs to be shown in the Report Designer component. By default, the Group Editor button is visible.


Type


boolean


Example


designerOptions.groupEditor.visible = false;


toolBox


Description


Settings available for the Toolbox menu in the Report Designer component.DOC-DETAILS-TAG-OPENDOC-SUMMARY-TAG-OPENvisible***DOC-SUMMARY-TAG-CLOSE


Description


Specifies whether the Toolbox menu needs to be shown in the Report Designer component. By default, the Toolbox menu is visible.


Type


boolean


Example


designerOptions.toolBox.visible = false;


propertiesTab


Description


Settings available for the Properties tab in the Report Designer component.DOC-DETAILS-TAG-OPENDOC-SUMMARY-TAG-OPENvisible***DOC-SUMMARY-TAG-CLOSE


Description


Specifies whether the Properties tab needs to be shown in the Report Designer component. By default, the Properties tab is visible.


Type


boolean


Example


designerOptions.propertiesTab.visible = false;


mode


Description


Specifies the available options for Properties Modes in the Report Designer component. The default value for this property is 'Both'.


Type


'Basic' | 'Advanced' | 'Both'


Example


designerOptions.propertiesTab.mode = 'Basic';


defaultMode (optional)


Description


Relevant only when mode is 'Both'. If undefined, the last used properties mode is set.


Type


'Basic' | 'Advanced'


Example


designerOptions.propertiesTab.defaultMode = 'Advanced';


dataTab


Description


Settings available for the Data tab in the Report Designer component.DOC-DETAILS-TAG-OPENDOC-SUMMARY-TAG-OPENvisible***DOC-SUMMARY-TAG-CLOSE


Description


Specifies whether the Data tab needs to be shown in the Report Designer component. By default, the Data tab is visible.


Type


boolean


Example


designerOptions.dataTab.visible = false;


dataSources


Description


Settings available for the Data Sources section in the Data tab.DOC-DETAILS-TAG-OPENDOC-SUMMARY-TAG-OPENvisible***DOC-SUMMARY-TAG-CLOSE


Description


Specifies whether the Data Sources section in the Data tab needs to be shown in the Report Designer component. By default, the Data Sources section is visible.


Type


boolean


Example


designerOptions.dataTab.dataSources.visible = false;


canModify


Description


Specifies whether it is possible to remove the data sources in the Data tab. The default value for this property is true.


Type


boolean


Example


designerOptions.dataTab.dataSources.canModify = false;


dataSets


Description


Settings available for the Datasets section in the Data tab.DOC-DETAILS-TAG-OPENDOC-SUMMARY-TAG-OPENvisible***DOC-SUMMARY-TAG-CLOSE


Description


Specifies whether the Datasets section in the Data tab needs to be shown in the Report Designer component. By default, the Datasets section is visible.


Type


boolean


Example


designerOptions.dataTab.dataSets.visible = false;


canModify


Description


Specifies whether it is possible to modify (i.e. add, edit, and delete) the datasets in the Data tab. The default value for this property is set to true.


Type


boolean


Example


designerOptions.dataTab.dataSets.canModify = false;


picker


Description


Settings available for Dataset Picker in the Data tab.DOC-DETAILS-TAG-OPENDOC-SUMMARY-TAG-OPENdataResources (optional)***DOC-SUMMARY-TAG-CLOSE


Description


It is possible to limit and/or reorder the list of data resources used for data sets creation. Specify the comma-separated data resources keys from the following list: DataSets, DataSources, and SemanticModels. The default order is DataSets, SemanticModels, and DataSources.


Type


string


Example

designerOptions.dataTab.dataSets.picker.dataResources = 'SemanticModels,DataSets';

parameters


Description


Settings available for the Parameters section in the Report Designer component.DOC-DETAILS-TAG-OPENDOC-SUMMARY-TAG-OPENvisible***DOC-SUMMARY-TAG-CLOSE


Description


Specifies whether the Parameters section needs to be shown in the Report Designer component. By default, the Parameters section is visible.


Type


boolean


Example


designerOptions.dataTab.parameters.visible = false;


canModify


Description


Specifies whether it is possible to modify (i.e. add, edit, and delete) the report parameters in the Parameters section. The default value for this property is set to true.


Type


boolean


Example


designerOptions.dataTab.parameters.canModify = false;


commonValues


Description


Settings available for the Common Values section in the Data tab.DOC-DETAILS-TAG-OPENDOC-SUMMARY-TAG-OPENvisible***DOC-SUMMARY-TAG-CLOSE


Description


Specifies whether the Common Values section in the Data tab needs to be shown in the Report Designer component. By default, the Common Values section is visible.


Type


boolean


Example


designerOptions.dataTab.commonValues.visible = false;


infoTab


Description


Settings available for the Info tab in the Report Designer component.DOC-DETAILS-TAG-OPENDOC-SUMMARY-TAG-OPENvisible***DOC-SUMMARY-TAG-CLOSE


Description


Specifies whether the Info tab needs to be shown in the Report Designer component. By default, the Info tab is visible.


Type


boolean


Example


designerOptions.infoTab.visible = false;


gridSize


Description


Settings available for the Grid Size editor in the Report Designer component.DOC-DETAILS-TAG-OPENDOC-SUMMARY-TAG-OPENvisible***DOC-SUMMARY-TAG-CLOSE


Description


Specifies whether the Grid Size editor in the Status Bar needs to be shown. The Grid Size editor is visible by default.


Type


boolean


Example


designerOptions.gridSize.visible = false;


value (optional)


Description


If the Grid Size editor is not visible, it is possible to specify the Grid Size value in in/cm (i.e. inches or centimeters).


Type


string


Example


designerOptions.gridSize.value = '0.5in';


showGrid


Description


Settings available for the Show Grid toggle in the Report Designer component.DOC-DETAILS-TAG-OPENDOC-SUMMARY-TAG-OPENvisible***DOC-SUMMARY-TAG-CLOSE


Description


Specifies whether the Show Grid toggle in the Status Bar needs to be shown. The Show Grid toggle is visible by default.


Type


boolean


Example


designerOptions.showGrid.visible = false;


value (optional)


Description


If the Show Grid toggle is not visible, it is possible to specify the Show Grid value as true or false.


Type


boolean


Example


designerOptions.showGrid.value = false;


disableFocusTimer (optional)


Description


Disables focus on highlighting timers on the buttons for better accessibility. The default value for this property is false.


Type


boolean


Example


designerOptions.disableFocusTimer = true;


expressionSyntax


Description


Specifies which Expression syntax will be used in the Report Designer component: 'i11n' - interpolation syntax or 'rdl' - old rdl expression syntax.


By default, the interpolation syntax is used for expressions.


Type


'i11n' | 'rdl'


Example


designerOptions.expressionSyntax = 'rdl';


Methods

openViewer (optional)


Description


You can plug-in the Report Viewer component by providing the openViewer() function implementation to the DesignerOptions object. When the openViewer() function is implemented and passed to the DesignerOptions object, a Preview button appears in the Designer's application bar.


Parameter (Type)


options: ViewerOptions


Return Type


void


Example

\\\`\\\`\\\`
designerOptions.openViewer = function(options) {
 // create viewer and open report
};
\\\`\\\`\\\`

updateRoute (optional)


Description


It is possible to implement custom logic for updating route when edited report information gets updated in the Designer. Report information such as - id / version / isTemplate gets updated on creating / opening / saving a report, after that updateRoute() function is called. By default, the updateRoute() function is undefined so the route remains unchanged.


Parameter (Type)


options: UpdateRouteOptions


Return Type


void


Example

\\\`\\\`\\\`
designerOptions.updateRoute = function(options) {
 // custom logic for updating route
};
\\\`\\\`\\\`

onSaved (optional)


Description


It is possible to implement custom logic to be executed after a report is saved.


Parameter (Type)


options: OnSavedOptions


Return Type


void


Example

\\\`\\\`\\\`
designerOptions.onSaved = function(options) {
 // custom logic to be executed after a report is saved
};
\\\`\\\`\\\`

makeTitle (optional)


Description


It is possible to implement custom logic for making a title of a browser tab containing the Designer. By default, the makeTitle() function is undefined so the title remains unchanged.


Parameter (Type)


reportName: string

options : MakeTitleOptions


Return Type


string


Example

\\\`\\\`\\\`
designerOptions.makeTitle = function(reportName, options) {
 // custom logic for making a title
}
\\\`\\\`\\\`

onError (optional)


Description


It is possible to implement custom logic on failed report (or template) operation.


Parameter (Type)


operation: ReportOperation


options: OnErrorOptions


Return Type


void


Example

\\\`\\\`\\\`
designerOptions.onError = function(operation, options) {
	console.log(\\\`[${operation}] ${options.errorCaption}\\\`);
	console.log(options.errorDetails.join('\\\n\\\n'));
};
\\\`\\\`\\\`

Type LocalizationResourceBundle

Type of GetLocalizationResourcesSuccessResult.resourceBundles array element.

Properties

ns


Description


Refers to the bundle namespace.


Type


string


resources


Description


Refers to the localization resources.


Type


Record<string, any>


Type AddLocalizationSuccessResult

Type of success result returned by the GrapeCity.WynReports.Designer.addLocalization() function.

Properties

type


Description


Refers to the success result type.


Type


success


Type AddLocalizationErrorResult

Type of error result returned by the GrapeCity.WynReports.Designer.addLocalization() function.

Properties

type


Description


Indicates the error result type.


Type


error


errorDetails


Description


Indicates the error caption.


Type


string


errorCaption


Description


Indicates the error caption.


Type


string[]


Type AddLocalizationResult

Type of result returned by the GrapeCity.WynReports.Designer.addLocalization() function.


Acceptable Values

AddLocalizationSuccessResult | AddLocalizationErrorResult

Type GetLocalizationResourcesSuccessResult

Type of success result returned by the GrapeCity.WynReports.Designer.getLocalizationResources() function.

Properties

type


Description


Refers to the success result type.


Type


success


resourceBundles


Description


Refers to the localization resources.


Type


LocalizationResourceBundle[] | undefined


Type GetLocalizationResourcesErrorResult

Type of error result returned by the GrapeCity.WynReports.Designer.getLocalizationResources() function.

Properties

type


Description


Refers to the error result type.


Type


error


errorCaption


Description


Refers to the error caption.


Type


string


errorDetails


Description


Refers to the error details.


Type


string[]


Type GetLocalizationResourcesResult

Type of result returned by the GrapeCity.WynReports.Designer.getLocalizationResources() function.


Acceptable Values

GetLocalizationResourcesSuccessResult | GetLocalizationResourcesErrorResult

Type DesignerApi

Type of the GrapeCity.WynReports.Designer object.

MethodsDOC-DETAILS-TAG-OPENDOC-SUMMARY-TAG-OPENcreateDesignerOptions***DOC-SUMMARY-TAG-CLOSE

Description


Creates the default DesignerOptions object to be passed to the GrapeCity.WynReports.Designer.renderApplication() function. This object includes both required and optional Designer settings.


Parameter (Type)


portalUrl: string

referenceToken (optional): string


Return Type


DesignerOptions


Example

const designerOptions = GrapeCity.WynReports.Designer.createDesignerOptions('<portalUrl>', '<referenceToken>');

renderApplication


Description


Renders the Report Designer to the div element with id designerElementId using the specified designerOptions. For now the div id must always be 'report-designer-app'.


Parameter (Type)


designerElementId: string

designerOptions: DesignerOptions


Return Type


Promise<void>


Example

GrapeCity.WynReports.Designer.renderApplication('report-designer-app', designerOptions);

addLocalization


Description


Adds custom localization resources for the Report Designer component. It is then required to pass the lng parameter to designerOptions.locale to apply the added resources.


Parameter (Type)


lng: string

resourceBundles: LocalizationResourceBundle[]


Return Type


AddLocalizationResult


Example

\\\`\\\`\\\`
const result = GrapeCity.WynReports.Designer.addLocalization('zh-CN', resourceBundles);
if (result.type === 'success') designerOptions.locale = 'zh-CN';
else console.error([result.errorCaption, ...result.errorDetails].join('\\\n'));
\\\`\\\`\\\`

getLocalizationResources


Description


Gets custom localization resources provided by the Wyn Enterprise Server API. The obtained resources are intended for the GrapeCity.WynReports.Designer.addLocalization() function.


Parameter (Type)


lng: string

portalUrl: string

referenceToken (optional): string


Return Type


Promise


Example

\\\`\\\`\\\`
const result = GrapeCity.WynReports.Designer.getLocalizationResources('zh-CN', '', '');
if (result.type === 'success') GrapeCity.WynReports.Designer.addLocalization('zh-CN', result.resourceBundles);
else console.error([result.errorCaption, ...result.errorDetails].join('\\\n'));
\\\`\\\`\\\`

closeViewer


Description


Closes the Report Viewer that is plugged-in to the Report Designer via the designerOptions.openViewer() function.


Return Type


void


Example


GrapeCity.WynReports.Designer.closeViewer();


destroy


Description


It destroys the Report Designer component. If it is needed to continue work with the Report Designer component after destroying it, it is mandatory to call the GrapeCity.WynReports.Designer.renderApplication() function again.


Return Type


void


Example


GrapeCity.WynReports.Designer.destroy();


focus


Description


Returns focus to the Report Designer component. Focus may be lost when plugged-in or external components are opened/closed. Returning focus is essential to continue using Designer hotkeys like Ctrl+Z (undo), Ctrl+Y (redo), etc.


Return Type


void


Example


GrapeCity.WynReports.Designer.focus();


Type PredefinedLocale

Predefined locales supported by the Report Designer component.


Acceptable Values

'en' | 'en-GB' | 'es' | 'pl' | 'zh' | 'zh-TW'

Type Locale

Type of DesignerOptions.locale and ViewerOptions.locale.


Acceptable Values

PredefinedLocale | string

Type Units

Measurement units supported by the Report Designer component.


Acceptable Values

'in' | 'cm'

Type UpdateRouteOptions

Type of options passed to the DesignerOptions.updateRoute() function.

PropertiesDOC-DETAILS-TAG-OPENDOC-SUMMARY-TAG-OPENid***DOC-SUMMARY-TAG-CLOSE

Description


Refers to the report (or template) id.


Type


string | null


version


Description


Refers to the report (or template) version.


Type


string | number | null


isTemplate


Description


Specifies whether a document is a report or a template.


Type


boolean


Type OnSavedOptions

Type of options passed to the DesignerOptions.onSaved() function.

PropertiesDOC-DETAILS-TAG-OPENDOC-SUMMARY-TAG-OPENid***DOC-SUMMARY-TAG-CLOSE

Description


Refers to the report (or template) id.


Type


string


name


Description


Refers to the name of the saved report (or template).


Type


string


isTemplate


Description


Specifies whether the saved document is a report or a template.


Type


boolean


Type MakeTitleOptions

Type of options passed to the DesignerOptions.makeTitle() function.

Properties

id


Description


Refers to the report (or template) id.


Type


string | null


version


Description


Refers to the report (or template) version.


Type


string | number | null


isTemplate


Description


Specifies whether a document is a report or a template.


Type


boolean


dirty


Description


Specifies whether a report (or a template) has any unsaved changes.


Type


boolean


Type ReportOperation

Type of report (or template) operation passed to the DesignerOptions.onError() function.


Acceptable Values

'create' | 'open' | 'save' | 'preview' | 'restore'

Type OnErrorOptions

Type of options passed to the DesignerOptions.onError() function.

Properties

id


Description


Refers to the report (or template) id. If operation on an existing report (or template) failed, id is defined. Otherwise, id is null.


Type


string | null


name


Description


Refers to the name of the report.


Type


string


version (optional)


Description


Refers to the report (or template) version. It is relevant only for the errors on open operation.


Type


number | null


isTemplate


Description


Indicates whether a report is a document or a template.


Type


boolean


errorCaption


Description


Indicates the error caption.


Type


string


errorDetails


Description


Refers to the error details.


Type


string[]


Type ApplicationInfo

Partial type of the DesignerOptions.aboutInfo object.

Properties

applicationTitle (optional)


Description


Specifies the application title to be used in the Report Designer component.


Type


string


Example


applicationTitle: 'Report Designer'


applicationTitleCompact (optional)


Description


Specifies the compact application title to be used in the Report Designer component in places where there is not enough space for a full title.


Type


string


Example


applicationTitleCompact: 'Designer'


Type ProductInfo

Partial type of the DesignerOptions.aboutInfo object.

Properties

productTitle (optional)


Description


Specifies the product title to be shown in the About dialog box of the Report Designer component.


Type


string


Example


productTitle: '<productTitle>'


productVersion (optional)


Description


Specifies the product version to be shown in About dialog box of the Report Designer component.


Type


string


Example


productVersion: '1.2.3'


Type HelpInfo

Type of an array element of the DesignerOptions.helpInfos array.

Properties

title (optional)


Description


Specifies the Help page title.


Type


string


Example


title: 'My Documentation'


link


Description


Specifies the Help page URL.


Type


string


Example


link: 'https://main-documentation.com/'


Type BarcodeSymbology

Barcode symbologies supported by the Report Designer component.


Acceptable Values

'Ansi39' | 'Ansi39x' | 'Aztec' | 'BC412' | 'Codabar' | 'Code_11' | 'Code_128_A' | 'Code_128_B' | 'Code_128_C' | 'Code_128auto' | 'Code_2_of_5' | 'Code_93' | 'Code25intlv' | 'Code39' | 'Code39x' | 'Code49' | 'Code93x' | 'DataMatrix' | 'EAN_13' | 'EAN_8' | 'EAN128FNC1' | 'GS1DataMatrix' | 'GS1QRCode' | 'HIBCCode128' | 'HIBCCode39' | 'IATA_2_of_5' | 'IntelligentMail' | 'IntelligentMailPackage' | 'ISBN' | 'ISMN' | 'ISSN' | 'ITF14' | 'JapanesePostal' | 'Matrix_2_of_5' | 'MaxiCode' | 'MicroPDF417' | 'MicroQRCode' | 'MSI' | 'Pdf417' | 'Pharmacode' | 'Plessey' | 'PostNet' | 'PZN' | 'QRCode' | 'RM4SCC' | 'RSS14' | 'RSS14Stacked' | 'RSS14StackedOmnidirectional' | 'RSS14Truncated' | 'RSSExpanded' | 'RSSExpandedStacked' | 'RSSLimited' | 'SSCC_18' | 'Telepen' | 'UCCEAN128' | 'UPC_A' | 'UPC_E0' | 'UPC_E1'

Type ViewerOptions

Type of options passed to the DesignerOptions.openViewer() function.

Properties

element


Description


Refers to the element id where to render the Report Viewer component.


Type


string


locale


Description


Refers to the locale to be passed by the Report Designer component.


Type


Locale


applicationTitle


Description


Allows you to get information about the report (or template) to be previewed.


Type


string


reportInfo


Description


Gets information about the report (or template) to be previewed.DOC-DETAILS-TAG-OPENDOC-SUMMARY-TAG-OPENid***DOC-SUMMARY-TAG-CLOSE


Description


Specifies the report (or template) id to be previewed.


Type


string


name


Description


Specifies the report (or template) name to be previewed.


Type


string


isTemplate


Description


Specifies whether the document to be previewed is a report or a template.


Type


boolean


isTemporary (optional)


Description


Specifies whether the report (or template) to be previewed is an existing one that is saved on the server-side.


Type


boolean


Type ReportingApi

Type of the GrapeCity.WynReports.Designer.api object.

Methods

isReportDirty


Description


Indicates whether a report (or template) has any unsaved changes.


Return Type


boolean


Example

\\\`\\\`\\\`
const hasUnsavedChanges = GrapeCity.WynReports.Designer.api.isReportDirty();
if (hasUnsavedChanges) console.log('There are unsaved changes.');
\\\`\\\`\\\`

getReportInfo


Description


Returns information about the currently edited report (or template).


Return Type


ReportInfo


Example

\\\`\\\`\\\`
const info = GrapeCity.WynReports.Designer.api.getReportInfo();
console.log(\\\`"${info.name}" is currently edited.\\\`);
\\\`\\\`\\\`

createReport


Description


Creates a new report to be edited in the Report Designer component using the specified options.


Parameter (Type)


options (optional): CreateReportOptions


Return Type


Promise


Example

\\\`\\\`\\\`
GrapeCity.WynReports.Designer.api.createReport({
 onFinish: () => {
 console.log('Finished creating a new report.');
	},
}).then(function(result) {
 if (result.type === 'error') {
	 console.log(result.errorCaption);
	 console.log(result.errorDetails.join('\\\n'));
	 return;
	}
	console.log(\\\`Report "${result.reportInfo.name}" is created successfully.\\\`);
});
\\\`\\\`\\\`

openReport


Description


Opens an existing report (or template) to be edited in the Report Designer component using the specified options.


Parameter (Type)


options: OpenReportOptions


Return Type


Promise


Example

\\\`\\\`\\\`
GrapeCity.WynReports.Designer.api.openReport({
 reportInfo: {
	 id: '6e975775-38e3-4ac5-b92c-0ff7dab091a6',
	 name: 'MyReport',
	},
	onFinish: () => {
	 console.log('Finished opening an existing report "MyReport".');
	},
}).then(function(result) {
 if (result.type === 'error') {
	 console.log(result.errorCaption);
 console.log(result.errorDetails.join('\\\n'));
	 return;
	}
	console.log(\\\`Report "${result.reportInfo.name}" is opened successfully.\\\`);
});
\\\`\\\`\\\`

saveReport


Description


Saves the report (or template) currently edited in the Report Designer component using the specified options.


Parameter (Type)


options: SaveReportOptions


Return Type


Promise


Example

\\\`\\\`\\\`
GrapeCity.WynReports.Designer.api.saveReport({
 reportInfo: {
	 name: 'MyReport',
	},
	onFinish: () => {
	 console.log('Finished saving a new report "MyReport".');
	},
}).then(function(result) {
 if (result.type === 'error') {
	 console.log(result.errorCaption);
	 console.log(result.errorDetails.join('\\\n'));
	 return;
	}
	console.log(\\\`Report "${result.reportInfo.name}" is saved successfully.\\\`);
});
\\\`\\\`\\\`

Type ReportInfo

Type of the return value of the GrapeCity.WynReports.Designer.api.getReportInfo() function.

Properties

id


Description


Refers to the report (or template) id. If an existing report (or template) is edited, id is defined. Otherwise, if a new report is edited, id is null.


Type


string | null


name


Description


Refers to the name of the report (or template).


Type


string


permissions


Description


Refers to the permissions defined for the report (or template).


Type


string[]


isTemplate


Description


Specifies whether a document is a report or a template.


Type


boolean


Type CreateReportOptions

Type of options passed to the GrapeCity.WynReports.Designer.api.createReport() function.

Properties

reportType (optional)


Description


Specifies the type of the new report, that is, CPL (RDL report) or FPL (Page report). By default, CPL (or RDL) report is created.


Type


'CPL' | 'FPL'


Example


reportType: 'FPL'


templateInfo (optional)


Description


If templateInfo is specified for report creation, either id or content needs to be defined.


Example

templateInfo: { id: 'b294d31c-81d2-48f1-9555-753023d62632', name: 'MyTemplate' }

id (optional)



Description


Refers to the template id. If id is defined, template content is loaded from the Wyn Enterprise server.


Type


string


Example

id: 'b294d31c-81d2-48f1-9555-753023d62632'

name (optional)


Description


Refers to the template name.


Type


string


Example

name: 'MyTemplate'

content (optional)


Description


If content is defined, new report is created based on this content.


Type


Any


dataSets (optional)


Description


If dataSets option is specified, new report is created with these data sets added.


Type


DataSetInfo[]


Example

dataSets: [{ id: '1f183c3f-64f9-4b4c-ac92-cd37580bde21', name: 'MyDataSet', version: 3 }]

Methods

onStart (optional)


Description


Callback on starting to create a report.


Return Type


void


Example

\\\`\\\`\\\`
onStart: () => {
 console.log('Started creating a new report.');
 }
\\\`\\\`\\\`

onFinish (optional)


Description


Callback on finishing to create a report.


Return Type


void


Example

\\\`\\\`\\\`
onFinish: () => {
 console.log('Finished creating a new report.');
}
\\\`\\\`\\\`

Type DataSetInfo

Type of an array element of the CreateReportOptions.dataSets array.

Properties

id


Description


Refers to the dataset id to use in the Report Designer component.


Type


string


Example


id: '1f183c3f-64f9-4b4c-ac92-cd37580bde21'


name


Description


Refers to the name of the dataset to use in the Report Designer component.


Type


string


Example


name: 'MyDataSet'


version


Description


Refers to the dataset version to use in the Report Designer component.


Type


string | number


Example


version: 3


Type ReportOperationErrorResult

Type of error result returned by the createReport(), openReport(), or saveReport() functions from GrapeCity.WynReports.Designer.api.

Properties

type


Description


Indicates the result type.


Type


error


errorCaption


Description


Indicates the error caption.


Type


string


errorDetails


Description


Indicates the error details.


Type


string[]


Type CreateReportSuccessResult

Type of success result returned by the GrapeCity.WynReports.Designer.api.createReport() function.

Properties

type


Description


Indicates the result type.


Type


success


reportInfo


Description


Enables you to get information about the created report.DOC-DETAILS-TAG-OPENDOC-SUMMARY-TAG-OPENid***DOC-SUMMARY-TAG-CLOSE


Description


Specifies the report id to open in the Report Designer component. It is always null for a new report.


Type


null


name


Description


Refers to the report name.


Type


string


version


Description


Refers to the report version. The version of the report is always null for a new report.


Type


null


isTemplate


Description


Specifies whether the created document is a report or a template. It is always false for a new report.


Type


false


Type CreateReportResult

Type of result returned by the GrapeCity.WynReports.Designer.api.createReport() function.


Acceptable Values

'CreateReportSuccessResult' | 'ReportOperationErrorResult'

Type OpenReportOptions

Type of options passed to the GrapeCity.WynReports.Designer.api.openReport() function.

Properties

reportInfo


Description


Enables you to get information about the report (or template) to be opened.


Example

reportInfo: { id: '6e975775-38e3-4ac5-b92c-0ff7dab091a6', name: 'MyReport' }

DOC-DETAILS-TAG-OPENDOC-SUMMARY-TAG-OPENid***DOC-SUMMARY-TAG-CLOSE


Description


Refers to the report (or template) id to be opened.


Type


string


Example


id: '6e975775-38e3-4ac5-b92c-0ff7dab091a6'


name (optional)


Description


Refers to the report (or template) name to be opened. The correct name needs to be always specified explicitly.


Type


string


content (optional)


Description


If content is defined, opened report (or template) content is overridden with this content.


Type


Any


permissions (optional)


Description


Refers to the permissions defined for the report (or template).


Type


string[]


version (optional)


Description


Refers to the report (or template) version to be opened.


Type


string | number | null


Example


version: 5


isTemplate (optional)


Description


Specifies whether the opened document is a report or a template.


Type


boolean


Example


isTemplate: false


Methods

onStart (optional)


Description


Callback on starting to open a report (or a template).


Return Type


void


Example

\\\`\\\`\\\`
onStart: () => {
 console.log('Started opening a report.');
}
\\\`\\\`\\\`

onFinish (optional)


Description


Callback on finishing to open a report (or a template).


Return Type


void


Example

\\\`\\\`\\\`
onFinish: () => {
 console.log('Finished opening a report.');
}
\\\`\\\`\\\`

Type OpenReportSuccessResult

Type of success result returned by the GrapeCity.WynReports.Designer.api.openReport() function.

Properties

type


Description


Indicates the result type.


Type


success


reportInfo


Description


Enables you to get information about the opened report (or template).DOC-DETAILS-TAG-OPENDOC-SUMMARY-TAG-OPENid***DOC-SUMMARY-TAG-CLOSE


Description


Specifies the report (or template) id to open in the Report Designer component.


Type


string


name


Description


Refers to the report (or template) name.


Type


string


version


Description


Refers to the report (or template) version.


Type


number | null


isTemplate


Description


Specifies whether the opened document is a report or a template.


Type


boolean


Type OpenReportResult

Type of result returned by the GrapeCity.WynReports.Designer.api.openReport() function.


Acceptable Values

'OpenReportSuccessResult' | 'ReportOperationErrorResult'

Type SaveReportOptions

Type of options passed to the GrapeCity.WynReports.Designer.api.saveReport() function.

Properties

reportInfo


Description


Enables you to get information about the report (or template) to be saved.


Example


reportInfo: { id: '6e975775-38e3-4ac5-b92c-0ff7dab091a6' }DOC-DETAILS-TAG-OPENDOC-SUMMARY-TAG-OPENid (optional)***DOC-SUMMARY-TAG-CLOSE


Description


Refers to the report (or template) id. If an existing report is to be overwritten on saving, the correct id should be specified explicitly.


Type


string


Example


id: '6e975775-38e3-4ac5-b92c-0ff7dab091a6'


name


Description


Refers to the report (or template) name. The correct name needs to be always specified explicitly.


Type


string


Example


name: 'MyReport'


isTemplate (optional)


Description


Specifies whether the saved document is a report or a template.


Type


boolean


Example


isTemplate: false


comment (optional)


Description


Refers to the saved report (or template) revision comment.


Type


string


Example


comment: 'Changed report theme'


publish (optional)


Description


Specifies whether publishing needs to be done after saving the report. This property is effective only for reports in case the Wyn Enterprise server supports drafts and when the user is an administrator or an organization administrator.


Type


boolean


Example


publish: true


Methods

onStart (optional)


Description


Callback on starting to save a report (or a template).


Return Type


void


Example

\\\`\\\`\\\`
onStart: () => {
 console.log('Started saving a report.');
}
\\\`\\\`\\\`

onFinish (optional)


Description


Callback on finishing to save a report (or a template).


Return Type


void


Example

\\\`\\\`\\\`
onFinish: () => {
 console.log('Finished saving a report.');
}
\\\`\\\`\\\`

Type SaveReportSuccessResult

Type of success result returned by the GrapeCity.WynReports.Designer.api.saveReport() function.

Properties

type


Description


Indicates the result type.


Type


success


reportInfo


Description


Enables you to get information about the saved report (or template).DOC-DETAILS-TAG-OPENDOC-SUMMARY-TAG-OPENid***DOC-SUMMARY-TAG-CLOSE


Description


Specifies the id for the saved report (or template) in the Report Designer component.


Type


string


name


Description


Refers to the name of the saved report (or template).


Type


string


version


Description


Refers to the version of the saved report (or template). It is always null after saving the report.


Type


null


isTemplate


Description


Specifies whether the saved document is a report or a template.


Type


boolean


Type SaveReportResult

Type of result returned by the GrapeCity.WynReports.Designer.api.saveReport() function.


Acceptable Values

'SaveReportSuccessResult' | 'ReportOperationErrorResult'