在"打印"对话框中打印时,WPF查看器崩溃

2020-09-24 01:05发布

点击此处---> 群内免费提供SAP练习系统(在群公告中)加入QQ群:457200227(SAP S4 HANA技术交流) 群内免费提供SAP练习系统(在群公告中)你好, 在通过单击工具栏上的打...

         点击此处--->   EasySAP.com群内免费提供SAP练习系统(在群公告中)

加入QQ群:457200227(SAP S4 HANA技术交流) 群内免费提供SAP练习系统(在群公告中)


你好,

在通过单击工具栏上的"打印"按钮(请参见下图1)后WPF查看器显示的打印对话框来打印报告时,在单击"打印"对话框中的"打印"按钮(请参见下图2)后,查看器将崩溃。

下面的第三张图描述了Visual Studio 2013中的错误消息。

我有用于Visual Studio的SAP Crystal Reports版本13.0.20.2399。

这是代码关联:

 private ReportViewer()//将其构造函数设为私有
 {
      InitializeComponent();
     //将水晶报表查看器所有者属性设置为此包含窗口
    //(防止引用报表中的公式字段时出错)
       crystalReportsViewer1.Owner = Window.GetWindow(this);
     //最初隐藏工具面板视图
      this.crystalReportsViewer1.ToggleSidePanel = Constants.Sid​​ePanelKind.None;


  私有void DeptBatchIdCards_Report()
    {
            //存储报告路径的变量
             字符串exeFolder = System.Windows.Forms.Application.StartupPath;
             字符串reportPath = System.IO.Path.Combine(exeFolder,@" ReportViews \ DeptBatch_IdCards.rpt");


            //创建报告文档对象并设置报告的数据源
             ReportDocument deptBatchIdCardsReport = new ReportDocument();
             deptBatchIdCardsReport.Load(reportPath);




             deptBatchIdCardsReport.SetDataSource(_employeeBO.GetEmployeeIdCard_List(Client.gblClientID,_deptList));
        
            //设置水晶报表查看器的报表源
             deptBatchIdCardsReport.Refresh();
             this.crystalReportsViewer1.ViewerCore.ReportSource = deptBatchIdCardsReport;
            
 }
 

图片1。

图片2。

图片3。

非常感谢!

R

(9.8 kB)