Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/asp.net/33.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报告失败。为什么?_C#_Asp.net_Vb.net_Reporting Services - Fatal编程技术网

C# Asp.Net报告失败。为什么?

C# Asp.Net报告失败。为什么?,c#,asp.net,vb.net,reporting-services,C#,Asp.net,Vb.net,Reporting Services,我在报表服务器上有一组报表。保存操作后,一个报告“收据”设置为立即打开,另一个报告“重印”将根据用户选择打开。这份报告就是收据。本报告由SSRS编制 我的问题是我得到的报告非常好。报告工作正常,但当我尝试导出收据报告时,会出现以下错误: 尚未指定报表定义的源 所以在那之后,我打开了这张重印报告的收据,它完美地导出了。 有人能告诉我为什么和如何解决它吗?在C代码中明确设置报表定义 reportViewer.LocalReport.ReportPath = reportPath 如果报告使用

我在报表服务器上有一组报表。保存操作后,一个报告“收据”设置为立即打开,另一个报告“重印”将根据用户选择打开。这份报告就是收据。本报告由SSRS编制

我的问题是我得到的报告非常好。报告工作正常,但当我尝试导出收据报告时,会出现以下错误:

尚未指定报表定义的源

所以在那之后,我打开了这张重印报告的收据,它完美地导出了。
有人能告诉我为什么和如何解决它吗?

在C代码中明确设置报表定义

   reportViewer.LocalReport.ReportPath = reportPath
如果报告使用嵌入式资源,请尝试

   LocalReport.ReportEmbeddedResource = "path to rdlc.rdlc"
当报表位于单独的引用程序集中时,通常会发生这种情况