lixiaojun
2025-02-19 294b81166f21e12247e784d6bf404f5f34b2ee19
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
using DevExpress.XtraReports.UI;
 
namespace HStation.WinFrmUI
{
    public partial class SimulationCommonReportDlg : DevExpress.XtraBars.Ribbon.RibbonForm
    {
        public SimulationCommonReportDlg()
        {
            InitializeComponent();
            this.IconOptions.Icon = Yw.WinFrmUI.GlobalParas.AppIcon;
        }
 
        /// <summary>
        /// 绑定数据
        /// </summary>
        public void SetBindingData(SimulationPrintViewModel vm)
        {
            // 创建报表实例
            var report = new SimulationCommonReport();
            report.SetBindingData(vm);
 
            // 将报表加载到 DocumentViewer 中
            this.documentViewer1.DocumentSource = report;
 
            // 显示报表
            report.CreateDocument();
        }
 
 
    }
}