we have an ASP.NET 2.0 project here which uses Crystal Reports (that shipped with VS 2005 Pro) to render reports into PDF files. We're not actually displaying any of the reports on a web form - we're just using the CR engine to turn reports into PDF files and downloading those to the client.
The .RPT files are included in the web page assembly as "embedded resources".
Everything works fine on our devtest server - but on my local dev machine - freshly installed on a clean Win XP SP2 - I cannot get any of the reports to run. I can see and design them in VS 2005 Pro - but when I try to run them, I get this error:
System.Exception: Load report failed. ---> System.Runtime.InteropServices.COMException (0x80004005): Invalid class string
at CrystalDecisions.ReportAppServer.ClientDoc.ReportClientDocumentClass.Open(Object& DocumentPath, Int32 Options)
at CrystalDecisions.ReportAppServer.ReportClientDocumentWrapper.Open(Object& DocumentPath, Int32 Options)
Any ideas?? I've tried just about everything - I checked for permissions (the ASPNET user has all the necessary permissions on the temporary directories) and everything, but I just can't get this to work.....
Thanks for any hints!
Marc Scheuner / Berne, Switzerland
May The Source Be With You!
Did you ever get this problem resolved? I have the very same problem so would be glad of any help.
We are having the same problem. We are using VS 2005 w/ CR XI. We haven't placed it out on a web server yet, we're just fighting with this on my local machine. What we have is a web app, then web service, and a console app to eventually have the reports run on a scheduled job. The web app and web service run fine when it gets to rpt.Load([YourFielPath + "\\" + [Reportname]); but when the console app runs this it bombs. We tried adding <identity impersonate="true" userName="[YourDomanHere]\[YourUserNameHere]" password="[YourPasswordHere]"/> to the web.config file in the system.web section. This broke the web app, but once we changed IIS Directory Security for the folder to Digest authentication the web app started working again but the console app still bombs. So we put full on IIS integrated windows authentication and the console app still doesn't work.
The folder with the reports in it is on the network but that network folder allows me and my team full administrative rights to the folder. So sending my credentials to the folder and to the file itself should have worked but it still gives an innerException error of "Logon failure: unknown user name or bad password." thus the resulting exception "Load Report Failed".
It can't be the datasource giving us problems b/c we are just loading the report. We haven't gotten to the part about executing the report yet. So this has to be an authentication conflict between IIS, Windows, and CR XI. >< If you give this a whirl and it works for you then please post back here and let us know. Thanks!
YAY!!! I found a solution to ours. Don't know if this helps, but we put "[STAThread]" right above the void main in our console app and now it loads the application fine. We are finding that some other console applications are needing this as well for another third party SDK we are using. Try it out and see if it helps!