使用C#windows Forms应用程序我正在使用以下代码生成水晶报告 .

private void frmReportViewer_Load(object sender, EventArgs e)
    {
        using (ReportDocument report = new ReportDocument())
        {
            string a = (new System.Uri(Assembly.GetEntryAssembly().CodeBase)).AbsolutePath;
            string b = Path.GetDirectoryName(a);
            string fullPath = Path.Combine(b, "..\\..\\Reports\\DailyAttendance\\rpt_DailyAttendance.rpt");

            DataSet ds_attendance = new DataSet();
            ds_attendance = obj_dalTimeAttendance.getAttendanceReport();
            ds_attendance.Tables[0].TableName = "RPT_TIMESHEET";

            report.Load(fullPath);
            report.SetDataSource(ds_attendance);
            report.SetDatabaseLogon("cil_hr", "asd@123");
            rptViewer.ReportSource = report;
            rptViewer.DisplayToolbar = true;
            rptViewer.RefreshReport();
        }
    }

报告加载没有问题 . 但当我点击报表查看器中的工具栏按钮附加错误显示 . 任何的想法?

enter image description here