ASPxReportDesigner Class

A control to create an End-User Report Designer in ASP.NET applications.

Namespace: DevExpress.XtraReports.Web

Assembly: DevExpress.XtraReports.v18.2.Web.WebForms.dll

Declaration

public class ASPxReportDesigner :
    ASPxWebClientUIControl,
    IControlDesigner
Public Class ASPxReportDesigner
    Inherits ASPxWebClientUIControl
    Implements IControlDesigner

Quick Start

To add the End-User Report Designer to a web page, do the following.

  1. In Visual Studio, expand the DX.18.2: Reporting Toolbox tab and drop the ASPxReportDesigner control onto the page.

    asp-net-report-designer

  2. Assign a report to the Report Designer by calling the ASPxReportDesigner.OpenReport or ASPxReportDesigner.OpenReportXmlLayout method.

    To restore a report layout from a file or stream, call the XtraReport.FromFile or XtraReport.LoadLayout method.

  3. In the application's Web.config file, add the "resources" section as shown below.

    <devExpress>
        <!-- ... -->
        <resources>
            <add type="ThirdParty" />
            <add type="DevExtreme" />
        </resources>
    </devExpress>
    

    Alternatively, to avoid automatic loading of any libraries by a control (e.g., when such libraries are already referenced on the web page), declare an empty "resources" section and manually attach DevExtreme resources and the required third-party libraries (such as jQuery and Globalize) to the web page.

    <resources>
    </resources>
    

    Deleting the DevExpress "resources" section from the Web.config file will enable the default behavior (with automatic loading of only DevExtreme, without adding third-party libraries).

    To learn more about this configuration, see Embedding Third-Party Libraries.

  4. To enable the Report Designer to use an HttpContext (Session or User), specify the Session State property in the control's smart tag.

    This will add all necessary handlers to the application's Web.config file and register them at the application startup in the Global.asax file.

    protected void Application_Start(object sender, System.EventArgs e) {
        DevExpress.XtraReports.Web.WebDocumentViewer.Native.WebDocumentViewerBootstrapper.SessionState = 
            System.Web.SessionState.SessionStateBehavior.Required;
    
        DevExpress.XtraReports.Web.QueryBuilder.Native.QueryBuilderBootstrapper.SessionState = 
            System.Web.SessionState.SessionStateBehavior.Required;
    
        DevExpress.XtraReports.Web.ReportDesigner.Native.ReportDesignerBootstrapper.SessionState = 
            System.Web.SessionState.SessionStateBehavior.Required;
    }
    
  5. In Visual Studio 2012 and later versions, you need to exclude the directory with the default visual themes, along with the site.css file that is created automatically by the project because they may corrupt the layout of the document viewer toolbar. To do this, press CTRL+ALT+L to switch to the Solution Explorer, and remove the themes folder and Site.css file from the Content directory.

    report-toolbar-remove-default-styles

  6. Implement a report storage that will be used to store reports created in the Report Designer. Enabling this feature is required to support editing of subreports.
  7. If required, you can register default data sources that will be available for all report design sessions in the Report Designer.
  8. If required, you can also register default data connections that will be available in the SQL Data Source Wizard when creating new data sources.

To learn more, see Report Designer.

Inheritance

Object
ASPxReportDesigner

See Also