Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/csharp/322.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C# 数据未显示在crystal报告中_C#_Crystal Reports_Desktop - Fatal编程技术网

C# 数据未显示在crystal报告中

C# 数据未显示在crystal报告中,c#,crystal-reports,desktop,C#,Crystal Reports,Desktop,我正在开发一个学校管理系统。我面临一个有关crystal report中数据显示的问题。返回值为零。我使用了存储过程,DBMS也返回零值,我在这里附上了我的代码 private void showReport(int? clsID, int?facID, int? secID) { try { rd = new ReportDocument(); var data = obj.st_getTimeTableR

我正在开发一个学校管理系统。我面临一个有关crystal report中数据显示的问题。返回值为零。我使用了存储过程,DBMS也返回零值,我在这里附上了我的代码

private void showReport(int? clsID, int?facID, int? secID)
    {
        try
        {
            rd = new ReportDocument();
            var data = obj.st_getTimeTableReport(clsID, facID, secID);
            rd.Load(Application.StartupPath + "\\Reports\\timetablereport.rpt");
            rd.SetDataSource(data.ToList());
            crystalReportViewer1.ReportSource = rd;
            crystalReportViewer1.RefreshReport();
            
        }
        catch (Exception ex)
        {
            MainClass.showMsg(ex.Message, "Error", "Error");
            if(rd != null)
            {
                rd.Close();
            }
        }
    }