报表-直接SQL报表-获取选择行原创
金蝶云社区-Howhy
Howhy
4人赞赏了该文章 391次浏览 未经作者许可,禁止转载编辑于2023年06月27日 11:09:58

有时候,我们需要获取直接SQL报表的选择行,类似以下选择行

image.png

获取代码如下:

using Kingdee.BOS.Core.DynamicForm.PlugIn;
using Kingdee.BOS.Core.DynamicForm.PlugIn.Args;
using Kingdee.BOS.Core.Report.PlugIn;
using Kingdee.BOS.Util;
using Kingdee.BOS.Web.Report.SQLReport;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Cloud.BOS.Support.Report.SQLReport
{
    [HotUpdate]
    public class SqlRptSelRowPlugin:AbstractDynamicFormPlugIn
    {

        public override void BarItemClick(BarItemClickEventArgs e)
        {
            if (e.BarItemKey.EqualsIgnoreCase("btnExportCustomer"))
            {
                //获取报表左侧勾选的选择数据
                var selData = (this.View as SQLReportView).SelectedDataRows;
                //遍历DataRows[]数组,获取选择行数据
            }
        }

        
    }
}


赞 4