Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/csharp/295.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

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/asp.net/34.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# 使用ASP.Net显示多页记录的Crystal报表_C#_Asp.net_Crystal Reports - Fatal编程技术网

C# 使用ASP.Net显示多页记录的Crystal报表

C# 使用ASP.Net显示多页记录的Crystal报表,c#,asp.net,crystal-reports,C#,Asp.net,Crystal Reports,我有一份水晶报表,上面有工资单的版面。crystal报表有一个存储过程作为recordsource。代码如下 ReportDocument reportdocument = new ReportDocument(); reportdocument.Load(Server.MapPath("CrystalReport2.rpt")); reportdocument.SetDatabaseLogon("", "", @"BISWA-PC\SQLEX

我有一份水晶报表,上面有工资单的版面。crystal报表有一个存储过程作为recordsource。代码如下

ReportDocument reportdocument = new ReportDocument();
             reportdocument.Load(Server.MapPath("CrystalReport2.rpt"));
             reportdocument.SetDatabaseLogon("", "", @"BISWA-PC\SQLEXPRESS", "Forum_mall");
             reportdocument.SetParameterValue("@compId", compid);
             reportdocument.SetParameterValue("@DeptName", dept);
             reportdocument.SetParameterValue("@year_id", yearid);
             reportdocument.SetParameterValue("@month_id", monthid);
             CrystalReportViewer1.ReportSource = reportdocument;
返回的行数为200,但报告显示了第一条记录和转到下一页的页面链接。单击链接页面时,会显示此错误消息

“/FORUM”应用程序中出现服务器错误

系统找不到指定的路径

描述:执行当前web请求期间发生未处理的异常。请查看堆栈跟踪以了解有关错误的更多信息以及错误在代码中的起源

异常详细信息:System.Runtime.InteropServices.COMException:系统找不到指定的路径

源错误:

在执行当前web请求期间生成了未经处理的异常。有关异常的起源和位置的信息可以使用下面的异常堆栈跟踪来识别

堆栈跟踪:

但是,如果我在后端以报表查看器的形式查看报表,那么在所有200条记录中,它会很好地将报表格式化为组智能员工id

报告中给出的设置在“详细信息”部分“在组页脚上单击保持在一起”部分“单击之前的新页面”(我也尝试了之后的新页面)组页眉部分未进行选择

有谁能帮我出什么事了吗。我正在使用ASP.NET3.5和CrystalReports在WEB上运行该程序


提前感谢

您可以从


听起来好像您错误地使用了这一行
reportdocument.Load(Server.MapPath(“CrystalReport2.rpt”)尝试下面的方法
reportdocument.Load(Server.MapPath(“~/CrystalReport2.rpt”)