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; } /// /// 绑定数据 /// public void SetBindingData(SimulationPrintViewModel vm) { // 创建报表实例 var report = new SimulationCommonReport(); report.SetBindingData(vm); // 将报表加载到 DocumentViewer 中 this.documentViewer1.DocumentSource = report; // 显示报表 report.CreateDocument(); } } }