cancel
Showing results for 
Search instead for 
Did you mean: 

File name and file path of report are blank

0 Kudos


I have a .net application created in Visual Studio 2010.  There is a section of the app where users should be able to open various Crystal reports but when I try to open them in Visual Studio on my development machine I get the error, "Invalid file name".  When I run the app in debug mode and view the report object in the watch window many of the properties of the report have the value, "Load report failed" and the Report Source property has the value of, "The report filename was empty".  The FileName and FilePath properties do have blank values.  The m_sTempFileName property has the value of "C:\Windows\TEMP\temp_ea6b290b-33ce-4996-a0c5-5c31c62ec6fc.rpt" and the TempFilename property has the value of "C:\Windows\TEMP\temp_415d233f-3e4f-4830-8230-af4757207519.rpt".  Both of those files exist in the Temp folder and they contain the template of the report I'm trying to open.  The account the app is running under has Full Control permissions on the Temp folder.  I have another .net app on the same machine that uses the same mechanism to open reports and it works fine.  I also deployed the app to a production server and the reports also open there.

Any suggestions would be greatly appreciated.

Accepted Solutions (1)

Accepted Solutions (1)

former_member183750
Active Contributor
0 Kudos

I suspect we're still looking at a permissions issue. Use Process Monitor and look for messages like "Access Denied" in the logs. This may be on a folder, a file or reg folder.

See KBA: 1767684 - Error - CrystalReportsException: Load report failed / Invalid file name




- Ludek

Senior Support Engineer AGS Product Support, Global Support Center Canada

Follow us on Twitter

0 Kudos

Hello Uher,

Thanks for your response.  I ran Process Monitor while trying to open a report but did not see anything unusual, although I'm not that familiar with Process Monitor.  I also look through the Event Viewer.  There were no errors and only one warning which didn't give any new info.  Basically all it said was, "An unhandled exception has occurred" and "Load report failed".

Any other thoughts?

0 Kudos

I delved a little deeper into Process Monitor and found 5 Access Denied results for the w3wp.exe process. Four for RegCreateKey and one for Create File. I've included a screen shot.

0 Kudos

Right clicking on each of the events shown in the snap shot and looking as the process properties revealed that the account my app is running under is indeed the one being denied access.  Giving it write permissions on the C: drive resolved the issue.  I'm not sure why this is necessary as I did not have to do this for the other app but I'll do a little more looking around.  Thanks for your assistance.

former_member183750
Active Contributor
0 Kudos

And I really appreciate you doing the procmon work and letting us know the solution

Happy coding,

- Ludek

Answers (0)