Windows 7 Crystal Reports在调试模式下工作在调试器外部失败 我有一个.net 2应用程序,它使用水晶报表席R2(115.37万.0)进行报告。 它在Windows XP下工作正常,但在Windows 7上显示出奇怪的行为

Windows 7 Crystal Reports在调试模式下工作在调试器外部失败 我有一个.net 2应用程序,它使用水晶报表席R2(115.37万.0)进行报告。 它在Windows XP下工作正常,但在Windows 7上显示出奇怪的行为,windows-7,crystal-reports-xi,Windows 7,Crystal Reports Xi,在Windows7中,当在调试模式(F5)下运行时,一切看起来都很好,但是如果我们直接启动EXE(无调试;CTRL+F5),它将无法显示报告 我可以从堆栈跟踪中看到以下信息,但在这里我完全不知道 at CrystalDecisions.ReportAppServer.ReportClientDocumentWrapper.EnsureDocumentIsOpened() at CrystalDecisions.CrystalReports.Engine.ReportDocument.Loa

在Windows7中,当在调试模式(F5)下运行时,一切看起来都很好,但是如果我们直接启动EXE(无调试;CTRL+F5),它将无法显示报告

我可以从堆栈跟踪中看到以下信息,但在这里我完全不知道

at CrystalDecisions.ReportAppServer.ReportClientDocumentWrapper.EnsureDocumentIsOpened()
   at CrystalDecisions.CrystalReports.Engine.ReportDocument.Load(String filename, OpenReportMethod openMethod, Int16 parentJob)
   at CrystalDecisions.CrystalReports.Engine.ReportClass.Load(String reportName, OpenReportMethod openMethod, Int16 parentJob)
   at CrystalDecisions.CrystalReports.Engine.ReportDocument.EnsureLoadReport()
   at CrystalDecisions.CrystalReports.Engine.ReportDocument.SetDataSourceInternal(Object val, Type type)
   at CrystalDecisions.CrystalReports.Engine.ReportDocument.SetDataSource(DataSet dataSet)
有人曾经面对过这样的麻烦并康复了吗? 善意的帮助总是值得感激的


编辑:此应用程序在单个UI线程上运行。这是一个Winforms应用程序。

此问题是由于Windows 7中的数据执行预防安全功能造成的。 有两种方法可以解决这个问题

  • 在构建后脚本中添加以下行,并忽略此问题
  • 调用“$(DevEnvDir)\..\..\VC\bin\vcvars32.bat” 调用“$(DevEnvDir)\..\VC\bin\editbin.exe”/NXCOMPAT:NO“$(TargetPath)”
  • 完全禁用DEP(不推荐。这会打开安全漏洞),一切正常
  • 安装水晶报表席R2服务包6运行时。此运行时与Windows 7兼容(根据其发行说明。我还没有测试)

  • 此问题是由于Windows 7中的数据执行预防安全功能造成的。 有两种方法可以解决这个问题

  • 在构建后脚本中添加以下行,并忽略此问题
  • 调用“$(DevEnvDir)\..\..\VC\bin\vcvars32.bat” 调用“$(DevEnvDir)\..\VC\bin\editbin.exe”/NXCOMPAT:NO“$(TargetPath)”
  • 完全禁用DEP(不推荐。这会打开安全漏洞),一切正常
  • 安装水晶报表席R2服务包6运行时。此运行时与Windows 7兼容(根据其发行说明。我还没有测试)

  • 如果您使用crystal reports的report文件夹,那么从debug文件夹复制reports文件夹并将其放在bin文件夹中的release文件夹中,然后在release模式下运行项目就很简单了。
    谢谢

    如果您使用crystal reports的report文件夹,那么很容易从debug文件夹复制reports文件夹,并将其放在bin文件夹的release文件夹中,然后在release模式下运行项目。
    谢谢

    什么是异常(第一行似乎缺失)?异常类型为System.exception。Mesage为“加载报告失败”。异常是什么(看起来第一行丢失)?异常类型为System.exception。Mesage为“加载报告失败” call "$(DevEnvDir)\..\..\VC\bin\vcvars32.bat" call "$(DevEnvDir)\..\..\VC\bin\editbin.exe" /NXCOMPAT:NO "$(TargetPath)"