How to add custom data-extension for Web Report Designer in JS application
The Syncfusion Web Report Designer has a support to access the custom data extension.
Refer to the following documentation link to create a Report Designer sample in JS.
Getting Started documentation.
Please find the below steps to add the Web API DataExtension sample in our Web Report Designer sample.
Step1: Add the Web API Extension project reference to our Web Report Designer sample as shown in below snap:
Step2: Add the configuration section in AppConfig or WebConfig file as shown in below code example.
App.config
<?xml version="1.0" encoding="utf-8" ?> <configuration> <configSections> <section name="ReportingExtensions" type="Syncfusion.Reporting.Extensions, Syncfusion.Report.Portable" allowLocation="true" allowDefinition="Everywhere" /> </configSections> <ReportingExtensions> <DataExtension> <Extension Name="WebAPI" Assembly="Syncfusion.Reporting.DataExtensions.WebAPI" Type="Syncfusion.Reporting.DataExtensions.WebAPI.WebAPIExtension"> <Properties> <Add Key="QueryDesignerEnabled" Value="true"/> <Add Key="QueryFilterEnabled" Value="false"/> <Add Key="QueryExpressionEnabled" Value="false"/> <Add Key="QueryJoinerEnabled" Value="false"/> <Add Key="QueryColumnEdit" Value="false"/> </Properties> </Extension> </DataExtension> </ReportingExtensions> </configuration>
Step2: Set the reportDataExtensions property in Default.html file as shown in below code example.
Default.html
$("#container").ejReportDesigner( { serviceUrl: '../../api/ReportingAPI', create: $.proxy(controlInitialized, this), reportDataExtensions: [{ className: 'WebAPIDataSource', name: 'WebAPI', imageClass: 'e-reportdesigner-datasource-webapi', displayName: 'WebAPI' }], queryDesignerOptions: qryOptions });
You can download the sample from the following location.
Sample
http://www.syncfusion.com/downloads/support/directtrac/general/ze/DataExtensionSample-1182880882