cancel
Showing results for 
Search instead for 
Did you mean: 

Invalid file name. Crystal Reports

Former Member
0 Kudos

Hello,

I need some help on following error:

System.Runtime.InteropServices.COMException: Invalid file name.

Stactrace:

[COMException (0x800001fb): Invalid file name.]

   CrystalDecisions.ReportAppServer.ClientDoc.ReportClientDocumentClass.Open(Object& DocumentPath, Int32 Options) +0

   CrystalDecisions.ReportAppServer.ReportClientDocumentWrapper.Open(Object& DocumentPath, Int32 Options) +95

   CrystalDecisions.ReportAppServer.ReportClientDocumentWrapper.EnsureDocumentIsOpened() +270

[CrystalReportsException: Load report failed.]

   CrystalDecisions.ReportAppServer.ReportClientDocumentWrapper.EnsureDocumentIsOpened() +333

   CrystalDecisions.CrystalReports.Engine.ReportDocument.Load(String filename, OpenReportMethod openMethod, Int16 parentJob) +877

   CrystalDecisions.CrystalReports.Engine.ReportDocument.Load(String filename) +84

- Harshil

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

I had the same error and solved it by enabling the asp.net of Application Development Features.

Control Panel-->Internet Information Services-->World wide web Services-->Application Development Features.

former_member183750
Active Contributor
0 Kudos

What do you have to do to get that error?

At what line your code does this happen?

What version of CR / BO?

What version of .NET?

- Ludek

Follow us on Twitter

Got Enhancement ideas? Try the SAP Idea Place

Share Your Knowledge in SCN Topic Spaces

Former Member
0 Kudos

I am using CR 13 SP2 with framework 4.0 on IIS7

The error is coming while creating temp rpt file

Process monitor shows that before creating temp report under C:\Windows\Temp, it is trying to create someting on C: root.

former_member183750
Active Contributor
0 Kudos

Let's get you to SP4.

If after you apply SP4, the issue persists, please provide more info on:

Process monitor shows that before creating temp report under C:\Windows\Temp, it is trying to create someting on C: root.

How do you know "it is trying something on C: root?

Also, provide the CR references in the project and their versions.

- Ludek

Former Member
0 Kudos

I've upgraded to SP4 but the issue is still persist.

Please check attached screen of Process Monitor, highlighted row shows the process of writing on C: root has been denied.

former_member183750
Active Contributor
0 Kudos

See if running under Local Admin helps. If you already are running under Local Admin, then for some reason Local Admin does not have rights to C root. Enabling read / write rights should get this going.

- Ludek

Former Member
0 Kudos

I want to sandbox the application as we are running shared hosting service, so i cant give admin access of C root to the user.

former_member183750
Active Contributor
0 Kudos

That may be a problem...

You may want to use an http sniffing utility like Charles or Fiddler to find out where exactly the issue is and then try to work through / around it somehow.

- Ludek

Former Member
0 Kudos

The issues is with crystal reports not with http transmission, Infect it works fine with admin access. We have already figure out that crystal report is trying to write file object on C root before writing temp file in C:\Windows\Temp and IIS user dosen't have access on C root. So my question is why crystal report is trying to write on C root ?

Former Member
0 Kudos

<bump> 🙂 Just a quick friendly reminder.. I still have this issue, and any help would be greatly appreciated!

To recap the question: why does crystal reports need to be able to create a file on the C:\? I would ideally not like my application to be attempting to write outside of it's own application root or temp directories.

Thanks,

Harshil

former_member183750
Active Contributor
0 Kudos

why crystal report is trying to write on C root ?

- Not sure. Should not be. However, if as a test, you give the worker process read / write rights to c root, does it work then?

- Ludek

Former Member
0 Kudos

Yes it works after giving read / list rights to c root.

- Harshil