ASPxReportDesigner Class
A control to create an End-User Report Designer in ASP.NET applications.
Namespace: DevExpress.XtraReports.Web
Assembly: DevExpress.XtraReports.v24.1.Web.WebForms.dll
NuGet Package: DevExpress.Web.Reporting
Declaration
Remarks
Quick Start
To add the End-User Report Designer to a web page, do the following.
In Visual Studio, expand the DX.24.1: Reporting Toolbox tab and drop the
ASPxReportDesigner
control onto the page.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.
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 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.
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; }
You should 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.
- 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.
- If required, you can register default data sources that will be available for all report design sessions in the Report Designer.
- If required, you can also register default data connections that will be available in the Data Source Wizard when creating new data sources.
To learn more, see Report Designer.