Add custom data-extension in ASP.NET MVC Report Designer.
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 ASP.NET MVC.
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>
Step3: Set ReportDataExtensions property in Index.cshtml file as shown in below code example.
Index.schtml
<div style="width:100%; height:100%; position:absolute;">
@{Html.EJ().ReportDesigner("designer").ServiceUrl("/api/DesignerAPI").ReportDataExtensions(ext => { ext.ClassName("WebAPIDataSource").Name("WebAPI").ImageClass("e-reportdesigner-datasource-webapi").DisplayName("WebAPI").Add(); }).Render();}
</div>
@(Html.EJ().ScriptManager())
You can download the sample from the following location.
Sample
https://www.syncfusion.com/downloads/support/directtrac/general/ze/MVCWebReportDesigner1328431685