问题:
我们有一个 asp.net reportviewer,它动态地将数据集分配给 .rdlc,在我的本地机器上它工作得非常好,当我们发布到网络服务器并尝试运行它时会发生错误。
错误:
An error occurred during local report processing.
The report definition for report 'C:\Program Files (x86)\Acumatica ERP\WRIGHTACUMATICA\rErrorCompilation.rdlc' has not been specified
Could not find file 'C:\Program Files (x86)\Acumatica ERP\WRIGHTACUMATICA\rErrorCompilation.rdlc'.
附加信息:
错误中指定的目录不在服务器上。temp 是分配的数据集。
C#:
this.rvErrorCompilation.Reset();
this.rvErrorCompilation.LocalReport.ReportPath = Server.MapPath("~/rErrorCompilation.rdlc");
ReportDataSource rds = new ReportDataSource("dsErrorCompilation", temp);
this.rvErrorCompilation.LocalReport.DataSources.Clear();
this.rvErrorCompilation.LocalReport.DataSources.Add(rds);
this.rvErrorCompilation.DataBind();
this.rvErrorCompilation.LocalReport.Refresh();
ASP.NET:
<rsweb:ReportViewer ID="rvErrorCompilation" runat="server" Width="100%">
<LocalReport ReportPath="rErrorCompilation.rdlc">
<DataSources>
<rsweb:ReportDataSource />
</DataSources>
</LocalReport>
</rsweb:ReportViewer>
问题:
- 为什么会这样?
- 我该如何解决?