xtrareports-devexpress-dot-xtrareports-dot-web-dot-reportdesigner-deea6a9b.md
The class used to generate a client-side model of the Web End-User Report Designer.
Namespace : DevExpress.XtraReports.Web.ReportDesigner
Assembly : DevExpress.XtraReports.v25.2.Web.dll
NuGet Package : DevExpress.Web.Reporting.Common
public class ReportDesignerClientSideModelGenerator :
IReportDesignerClientSideModelGenerator
Public Class ReportDesignerClientSideModelGenerator
Implements IReportDesignerClientSideModelGenerator
The following code implements the controller action and returns the Report Designer model. For more information on Report Designer server-side configuration, refer to the following help topic: Report Designer Server-Side Configuration (ASP.NET MVC).
Note
The complete sample project How to Perform the JavaScript Report Designer Integration (with npm or Yarn package managers) is available in the DevExpress Examples repository.
using DevExpress.Web.Mvc.Controllers;
using DevExpress.XtraReports.Web.ReportDesigner;
using System.Web.Mvc;
// ...
public ActionResult GetReportDesignerModel(string reportUrl)
{
Response.AppendHeader("Access-Control-Allow-Origin", "*");
string modelJsonScript =
new ReportDesignerClientSideModelGenerator()
.GetJsonModelScript(
reportUrl,
// A report that the Report Designer loads when the application starts.
GetAvailableDataSources(),
// Data sources available in the Report Designer.
"ReportDesigner/Invoke",
// Controller action that processes Report Designer requests.
"WebDocumentViewer/Invoke",
// Controller action that processes Web Document Viewer requests.
"QueryBuilder/Invoke"
// Controller action that processes Query Builder requests.
);
return Content(modelJsonScript, "application/json");
}
Imports DevExpress.Web.Mvc.Controllers
Imports DevExpress.XtraReports.Web.ReportDesigner
Imports System.Web.Mvc
' ...
Public Function GetReportDesignerModel(ByVal reportUrl As String) As ActionResult
Response.AppendHeader("Access-Control-Allow-Origin", "*")
Dim modelJsonScript As String = (New ReportDesignerClientSideModelGenerator()).GetJsonModelScript(reportUrl, GetAvailableDataSources(), "ReportDesigner/Invoke", "WebDocumentViewer/Invoke", "QueryBuilder/Invoke")
Return Content(modelJsonScript, "application/json")
End Function
IReportDesignerClientSideModelGenerator
Object ReportDesignerClientSideModelGenerator
See Also