Skip to main content
A newer version of this page is available. .

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.v19.1.Web.dll

NuGet Package: DevExpress.Web.Reporting.Common

Declaration

public class ReportDesignerClientSideModelGenerator

Example

The following code implements the controller action specified in the JavaScript-based application’s client-side configuration and returns the Report Designer model.

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");
  }

The following code snippet (auto-collected from DevExpress Examples) contains a reference to the ReportDesignerClientSideModelGenerator class.

Note

The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.

Inheritance

Object
ReportDesignerClientSideModelGenerator
See Also