cancel
Showing results for 
Search instead for 
Did you mean: 

ReportDocument load error

tschuler
Explorer
0 Kudos

Hello,

I have a problem with the CrystalReportViewer or more precisely with the Load method of the ReportDocument.

My application instances a ReportDocument for the ReportSource property of the CrystalReportViewer.


cryRpt = new CrystalDecisions.CrystalReports.Engine.ReportDocument

cryRpt.Load(<path and filename>)

...

Form1.CrystalReportViewer1.ReportSource = cryRpt

In my developer system (VS 2010 professional; .NET Framework 4; CRforVS_13_0_9) everything works well.

But on the customer system (.NET Framework 4; CRRuntime_32bit_13_0_9) the Load method of the ReportDocument fails with the error


Bericht konnte nicht geladen werden.

(Translation: Report could not be loaded.)

The attached file error1.jpg contains the whole message including the stack-trace.

The inner exception of this error is


Das System kann den angegebenen Pfad nicht finden.

(Translation: The system cannot find the specified path.)

The attached file error2.jpg contains the whole message including the stack-trace.

I have tried to load the report from several locations (local directory, server path) but nothing will work.

It is absolutely sure that the report exists in the specified path.

For test purposes I have specified a wrong path with intent. This is causing another inner exception.


Vorgang wird nicht unterstützt. Ein durch die JRC-Engine bearbeitetes Dokument kann nicht im C++ Stack geöffnet werden.

(Translation: Operation is not supported. A document that is processed by the JRC engine cannot be opened in the C++ stack.

The attached file error3.jpg contains the whole message including the stack-trace.

  • Does anyone know about this problem?
  • Because of the different message after specifying a wrong path I suppose that second message (erorr2.jpg) refers to another path, maybe an internal path within a DLL but not to the report path. Could that be?
  • Is the installation on the customer system (.NET Framework 4; CRRuntime_32bit_13_0_9) correct?
    Or is something missing?

Thank you in advance.
Best regards

Thomas

Accepted Solutions (1)

Accepted Solutions (1)

former_member188030
Active Contributor
0 Kudos

See if this helps,

http://scn.sap.com/community/crystal-reports-for-visual-studio/blog/2012/08/08/troubleshooting-error...

The load report error seems like a permissions issue.

Run process monitor along with your app, gather the log. Search the ProcMon log for the report name.

It will show you the error or cause why the app is not able to find the report.

Logically both the error messages imply the same thing, report is not being loaded.

Search the forum, a lot of info is available on these errors.

- Bhushan

Senior Engineer

SAP Active Global Support

Follow us on Twitter

Got Enhancement ideas? Try the SAP Idea Place

Getting started and moving ahead with Crystal Reports .NET applications.

tschuler
Explorer
0 Kudos

Hello,

thank you for your reply.

I followed your suggestion and run the process monitor.

But I think the report has been loaded successfully - as you can see in the attached file Logfile1.gif (it's a screenshot of the Logfile.xlsx filtered by "china_Packing_List.rpt")

I have also attached the whole logfile in CSV-Format (Logfile.txt). Maybe you can take a look at it. Perhaps there is another reason for the error.

Maybe I forgot an important detail in my first posting. The customer system is a Windows Server 2003, Service Pack 2 (32bit).

I don't know if this is relevant.

Regards

Thomas

former_member183750
Active Contributor
0 Kudos

Hi Thomas

Please have a look at the document Troubleshooting the error; Load Report Failed. See if there is anything there that will point you in the right direction.

Looking at the gif, I do have a small concern re. the path (e.g.; \\naahleap21\...). I'd suspect we're looking at some sort of a network share(?). So, one thing to try is to load the report from a local path. E.g.; c:\test\myreport.rpt. Does that work?

- Ludek

Senior Support Engineer AGS Product Support, Global Support Center Canada

Follow us on Twitter

tschuler
Explorer
0 Kudos

Hello Ludek,

thank you for your reply. I have read your document and I have found the reason for the error.

On page 6 - chapter "Missing C:\ drive"

The customer system has no C:\ drive, but only R:\ and S:\.

The CR runtime is installed on R:\

I have checked the registry and the following entry had referred to C:\

HKEY_LOCAL_MACHINE\SOFTWARE\SAP BusinessObjects\Crystal Reports for .NET Framework 4.0\Report Application Server\InprocServer\LocalConnectionMgr\ConnectionDirectoryPath

I have set that entry to R:\ but with no success.

Then I found in the forum the following thread: http://scn.sap.com/thread/1648537


Hurrah ... I got the solution. we can consider this as a bug in Win 7. We need to set Registry key values. Here are the steps.

1. Go  To Registry -> HKEY_LOCAL_MACHINE -> SOFTWARE -> Business Objects  -> Suite 12.0 -> Report Application Server -> InProcServer -> LocalConnectionMgr

2. Update Connection Directory Path to "D:\Program Files\Business Objects\Common\4.0\managed\dotnet2" (This is where Crystal Engine dll is physically there in the machine )

3. Right Click, Create a new key named "ReportDirectoryPath" and give one of the Drives. Ex : "D:\" (Where temporay copy of the report will be generated)

Restart the machine and run the application. Enjoy .

So I have set the entry "ConnectionDirectoryPath" to "R:\Program Files\SAP BusinessObjects\Crystal Reports for .NET Framework 4.0\Common\SAP BusinessObjects Enterprise XI 4.0\win32_x86\" and I added the new entry "ReportDirectoryPath" with value R:\.

After that I could open the report in the viewer without any problems.

Thank you again and kind regards

Thomas

former_member183750
Active Contributor
0 Kudos

Perfect Thomas

Many thanks for letting us know. I'll have to go over the Discussion that has the solution - see if I should be updating the doc I referenced or create a new KBA.

Have a great day,

- Ludek

tschuler
Explorer
0 Kudos

Hi Ludek,

I have done a few more tests.

First I have set the ConnectionDirectoryPath back to value C:\. But this had no effect. I could still open the report in the viewer without any problems.

Then I have deleted the ConnectionDirectoryPath. This had also no effect. The report could be opened.

So I think, the ConnectionDirectoryPath is not relevant for the problem.

After that I did the same with the ReportDirectoryPath.
Setting this key to C:\ causes the error as well as deletion of this key.

This key must obviously refer to an existing directory, because a value of C:\ fails.

I suppose, if the key does not exist the Load-method uses a hard-coded path on drive C:\, as default, because on my developer system this key is missing. It has a C:\ drive and I can open the reports without problems.

Do you know the usage of the ConnectionDirectoryPath or the  ReportDirectoryPath?

Regards

Thomas

ido_millet
Active Contributor
0 Kudos

Good detective work!
The ReportDirectoryPath controls where a temporary file for processing the report is created.

So, perhaps the runtime has a bug whereby, when that entry is missing, it uses a static value like "c:\temp".  But before jumping to that conclusion, please check to confirm the user in your environment has a TEMP environment variable?  Does that variable point to an existing folder? The runtime should use that location.

tschuler
Explorer
0 Kudos

Hi Ido,

I have checked the environment variables. For my user there are 2 variables defined:
TEMP and TMP. Both values refer to the same existing directory:

%USERPROFILE%\Local Settings\Temp

But when I type %TEMP% or %TMP% in -> Start -> Run I come to the directory

%USERPROFILE%\Local Settings\Temp\2

Maybe there are some strange logon scripts on that server. So I don't know whether the variables are being used properly on that server.

Thomas

ido_millet
Active Contributor
0 Kudos

Assuming the user has permissions on that folder, this confirms that the Crystal runtime might be handling poorly a scenario where the ReportDirectoryPath registry entry is missing.  Instead of using the TEMP environment variable, it is attempting to use some fixed path on the C drive (probably c:\temp).

Let's hope the SAP folks on this forum escalate this to the attention of the development team.

Answers (0)