简体   繁体   English

水晶报表-加载报表失败

[英]Crystal Report - Load report failed

I am using Crystal Report (10.2.3600.0) in Windows Application using c#.net 2.0. 我正在使用c#.net 2.0的Windows应用程序中使用Crystal Report(10.2.3600.0)。

I have deployed the application in many of the clients machine. 我已经在许多客户端计算机中部署了该应用程序。 Until recently it was found out that in one of the machine the report is not working. 直到最近才发现该报告在一台机器上不起作用。

From the log file following error is shown - 从日志文件显示以下错误-

StackTrace: at CrystalDecisions.ReportAppServer.ReportClientDocumentWrapper.EnsureDocumentIsOpened() at CrystalDecisions.CrystalReports.Engine.ReportDocument.Load(String filename, OpenReportMethod openMethod, Int16 parentJob) at CrystalDecisions.CrystalReports.Engine.ReportDocument.Load(String filename, OpenReportMethod openMethod) at FlexiPackOfficeAutomation.frmJobCardViewer.PopulateReportFields() InnerException: The system cannot find the path specified. StackTrace:位于CrystalDecisions.CrystalReports.Engine.ReportDocument.Load(String filename,OpenReportMethod openMethod,Int16 parentJob)处的CrystalDecisions.ReportAppServer.ReportClientDocumentWrapper.EnsureDocumentIsOpened()处CrystalDecisions.CrystalReports.Engine.ReportDocument.Load(String filename,OpenReportMethod openMethod)处FlexiPackOfficeAutomation.frmJobCardViewer.PopulateReportFields()InnerException:系统找不到指定的路径。

One important thing which i noticed in that machine is that there is no C Drive. 我在那台机器上注意到的一件事很重要,那就是没有C盘。 The windows is installed in H: Drive. Windows安装在H:驱动器中。 I am not sure whether this is causing the issue. 我不确定这是否是导致问题的原因。

The code which i am using to load the report is as follows, 我用来加载报告的代码如下,

CrystalDecisions.CrystalReports.Engine.ReportDocument JobCard1 = new CrystalDecisions.CrystalReports.Engine.ReportDocument();


cFPWebService objWS = new cFPWebService();

//Get the Job Details from the Webservice
DataSet mDsJobDetails = objWS.ObjWebService.GetJobDetails_ForCrystalReport(this._JobID);

string FileName = "rassdk://" + Directory.GetCurrentDirectory() + @"\reports\JobCard.rpt";
//Load the Crystal Report File
JobCard1.Load(FileName, CrystalDecisions.Shared.OpenReportMethod.OpenReportByTempCopy);
//Set the reportsource of the Crystal Report Viewer as this JobCard
crvJobCard.ReportSource = JobCard1;

I have tried the following on the clients machine 我在客户端计算机上尝试了以下操作

  1. Reinstalled the crystal report Runtime 重新安装水晶报表运行时
  2. Reinstalled the software 重新安装软件

Thanks, 谢谢,

Search the entire registry for "Crystal". 在整个注册表中搜索“ Crystal”。 You'll find a key or two that is probably incorrect in pointing to the v10 DLLs on the C drive. 您会发现一两个可能不正确的密钥,它们指向C驱动器上的v10 DLL。

If you'll update the registry keys to the correct H drive location, it should work. 如果将注册表项更新为正确的H驱动器位置,则应该可以使用。

Found this troubleshooting document at SAP. 在SAP找到了此故障排除文档 Looks like there's a section on installs without a C: drive. 看起来好像有没有安装C:驱动器的部分。 The relevant section: 相关部分:

Missing “C:\\” drive The application is deployed to a computer that does not have a “C:” drive. 缺少“ C:\\”驱动器该应用程序已部署到没有“ C:”驱动器的计算机上。 When the Crystal Reports runtime is installed via the msm or msi files, certain registry values are set to point to the C: drive. 通过msm或msi文件安装Crystal Reports运行时时,某些注册表值将设置为指向C:驱动器。 To resolve this issue modify registry values in the Registry Editor. 若要解决此问题,请在注册表编辑器中修改注册表值。 ... ...

At minimum, it will be necessary to modify the following string values: 至少需要修改以下字符串值:

  • CommonFiles 共同文件
  • Path 路径
  • ConnectionDirectoryPath 连接目录路径
  • ChartSupportpath ChartSupportpath
  • ReportDirectoryPath ReportDirectoryPath

The location of these string values varies depending on the version of Crystal Reports used. 这些字符串值的位置取决于所使用的Crystal Reports版本。 Search the registry on the development computer and study the appropriate keys. 在开发计算机上搜索注册表并研究适当的密钥。 Modify as needed on the runtime computer. 在运行时计算机上根据需要进行修改。

To troubleshoot these issues, a utility such as Process Monitor will prove useful. 要解决这些问题,使用诸如Process Monitor之类的实用程序将非常有用。

This wasn't my issue, but perhaps this will help. 这不是我的问题,但这也许会有所帮助。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM