简体   繁体   中英

Crystal Report - Load report failed

I am using Crystal Report (10.2.3600.0) in Windows Application using c#.net 2.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.

One important thing which i noticed in that machine is that there is no C Drive. The windows is installed in H: Drive. 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". You'll find a key or two that is probably incorrect in pointing to the v10 DLLs on the C drive.

If you'll update the registry keys to the correct H drive location, it should work.

Found this troubleshooting document at SAP. Looks like there's a section on installs without a C: drive. The relevant section:

Missing “C:\\” drive The application is deployed to a computer that does not have a “C:” drive. When the Crystal Reports runtime is installed via the msm or msi files, certain registry values are set to point to the C: drive. 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
  • ReportDirectoryPath

The location of these string values varies depending on the version of Crystal Reports used. 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.

This wasn't my issue, but perhaps this will help.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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