How to: Access the ASPxReportDesigner Control 如何:访问 ASPx 报告设计器控件

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.

本主题介绍如何访问报表 V2 模块用于在ASP.NET应用程序中创建和修改用户定义的报表的 ASPx 报告设计器控件。

 

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).

在本主题中,假定您有一个使用报表 V2 模块的 XAF 应用程序,并且您创建了一个或多个报表(请参阅报表 V2 模块概述)。

 

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.

该控件将换行到显示在"详细信息视图"中的视图项中。此视图的标识符通过使用报告AspNetModuleV2.报告设计细节视图WebName常数指定。因此,要直接访问控件的属性和事件,请使用以下视图控制器。

复制代码
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() {
        base.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.
        };
    }
}
复制代码

 

posted @   code first life  阅读(395)  评论(0编辑  收藏  举报
编辑推荐:
· Linux系列:如何用 C#调用 C方法造成内存泄露
· AI与.NET技术实操系列(二):开始使用ML.NET
· 记一次.NET内存居高不下排查解决与启示
· 探究高空视频全景AR技术的实现原理
· 理解Rust引用及其生命周期标识(上)
阅读排行:
· 阿里最新开源QwQ-32B,效果媲美deepseek-r1满血版,部署成本又又又降低了!
· 单线程的Redis速度为什么快?
· SQL Server 2025 AI相关能力初探
· AI编程工具终极对决:字节Trae VS Cursor,谁才是开发者新宠?
· 展开说说关于C#中ORM框架的用法!
历史上的今天:
2015-01-08 CSharp Similarities and Differences
2015-01-08 Nemerle Quick Guide
点击右上角即可分享
微信分享提示