ReportDesignerClientSideModelGenerator Class
The class used to generate a client-side model of the Web End-User Report Designer.
Namespace: DevExpress.XtraReports.Web.ReportDesigner
Assembly: DevExpress.XtraReports.v24.1.Web.dll
NuGet Package: DevExpress.Web.Reporting.Common
Declaration
public class ReportDesignerClientSideModelGenerator :
IReportDesignerClientSideModelGenerator
Example
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");
}
Implements
Inheritance
Object
ReportDesignerClientSideModelGenerator
See Also