A newer version of this page is available. Switch to the current version.

How to: Access the ASPxReportDesigner Control

  • 2 minutes to read

This topic describes how to access the ASPxReportDesigner control that is used by the Reports V2 Module to create and modify user-defined reports in ASP.NET applications.

In this topic, it is assumed that you have an XAF application that uses the Reports V2 Module, and you have created one or more reports (see Reports V2 Module Overview).

The control is wrapped into a View Item that is displayed in the Detail View. The identifier of this View is specified by using the ReportsAspNetModuleV2.ReportDesignDetailViewWebName constant. So, to directly access the control's properties and events, use the following View Controller.

using DevExpress.ExpressApp;
using DevExpress.ExpressApp.ReportsV2.Web;
using DevExpress.XtraReports.Web;
// ...
public class CustomizeReportDesginerController : ViewController<DetailView> {
    public CustomizeReportDesginerController() {
        TargetViewId = ReportsAspNetModuleV2.ReportDesignDetailViewWebName;
    protected override void OnActivated() {
        ReportDesignerDetailItem designerDetailItem =  View.GetItems<ReportDesignerDetailItem>()[0];
        designerDetailItem.ControlCreated += delegate(object sender, EventArgs e) {
            ASPxReportDesigner designerControl = designerDetailItem.ReportDesigner;
            // Place you code that accesses the designer control here.