IIS 8上的Crystal Report和ASP出错

时间:2016-05-31 10:18:52

标签: c# asp.net crystal-reports

我使用VS 2008和Crystal Report。 当我在调试模式下测试我的应用程序时,它正常工作。 但是当我在IIS8上发布我的项目时,它无法正常工作 我有一个错误:

    This field name is not known.Error in File C:\Windows\TEMP\ExamRecord_img {DAFBDC10-37ED-4DD5-8DCE-F9726C18E374}.rpt:
Error in formula  <Section_Visibility>.
'nextisnull({VR_CRSEXAMRECORD.CCL_ID})'
This field name is not known.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

这是我的HTML代码

<CR:CrystalReportViewer Visible="true" ID="CrystalReportViewer1" runat="server" AutoDataBind="true" CssClass="rptViewer" />

这是ASP代码

ReportDocument doc;
DataSet ds = new DataSet("SampleDS");
// Fill ds from Oracle => select * from View
doc = new ReportDocument();
doc.Load(Server.MapPath("Reports/" + rName + ".rpt"));
foreach (CrystalDecisions.CrystalReports.Engine.Table tb in doc.Database.Tables)
{
    // Bind Tabels
}
CrystalReportViewer1.ReportSource = doc;

1 个答案:

答案 0 :(得分:0)

检查Data Source,因为在执行报告时需要选择他/她期望的database