Works on Development box. Windows 7 64bit.
Not working on Deployed Server 2012 R2 64bit
Crystal Reports version 13_0_13.
2015-06-08 11:21:25,692 [7] FATAL DecalPrintWCWindowsService.clsDecal [(null)] - CreateDecalPDF:
System.Runtime.InteropServices.COMException (0x80004005): The system cannot find the path specified.
at CrystalDecisions.ReportAppServer.Controllers.ReportSourceClass.Export(ExportOptions pExportOptions, RequestContext pRequestContext)
at CrystalDecisions.ReportSource.EromReportSourceBase.ExportToStream(ExportRequestContext reqContext)
at CrystalDecisions.CrystalReports.Engine.FormatEngine.ExportToStream(ExportRequestContext reqContext)
at CrystalDecisions.CrystalReports.Engine.FormatEngine.Export(ExportRequestContext reqContext)
at CrystalDecisions.CrystalReports.Engine.ReportDocument.Export(ExportOptions options)
at DecalPrintWCWindowsService.clsDecal.CreateDecalPDF()
Code Snippet:
ReportDocument objCR_ReportDoc = new ReportDocument();
DiskFileDestinationOptions objDiskFileDestinationOptions;
ExportOptions objExportOptions;
objCR_ReportDoc.Load(sTemplatePath);
objDiskFileDestinationOptions = new DiskFileDestinationOptions();
objExportOptions = objCR_ReportDoc.ExportOptions;
objExportOptions.ExportDestinationType = ExportDestinationType.DiskFile;
objExportOptions.ExportFormatOptions = null;
objExportOptions.ExportFormatType = ExportFormatType.PortableDocFormat;
objDiskFileDestinationOptions.DiskFileName = msPDFPath + PDFFileName;
WriteLine(msPDFPath + PDFFileName);
objExportOptions.ExportDestinationOptions = objDiskFileDestinationOptions;
objCR_ReportDoc.Export(objExportOptions);
objCR_ReportDoc.Dispose();
It is exploding (throwing exception) at the second to last line... objCR_ReportDoc.Export(objExportOptions);
I have been researching this issue for several days, tried most all suggestions from this site and others, to no avail.
Any thoughts?
John
Request clarification before answering.
Hi John
Probably the best thing to do is throw Process Monitor on it and see what is the path the system cannot find. Make sure to set a filter for the app in procmon as it tends to create pretty massive logs. Once you have the procmon logs look for any errors or Access Denied messages.
- Ludek
Senior Support Engineer AGS Product Support, Global Support Center Canada
Follow me on Twitter
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Ludek,
Yes, I have searched for 'ACCESS DENIED', found in both logs, still nothing of note that I can see.
I have had a new VM set up for testing. I will test 'AS-IS' (The app is a Windows Service running as LOCAL SERVICE) and if needed I can put VS2013 on the box and debug it from there, so I will need to tear it down to code pieces that I can execute for testing at which time it will be running under my account, different permissions perhaps, but might shed some light on the issue, then again, it might not.
I can send both logs along for preview by you or someone on your end if you think that might help.
Thanks
John
Hi Ludek,
This is where I am at as of now.
We have set up a VM that is a copy of the deployed server to test on. I was able to set-up and run remote debugging on this new VM.
The program is a Windows Service. It is being run on 'LOCAL SYSTEM' account (not 'LOCAL SERVICE' as I said before, my mistake) this 'should' rule out permission issues.
The program gathers data from an Informix database and creates an XSD file as it should, this works just fine.
The .rpt file exists and is accessible and does not throw an exception on the ReportDocument.Load(...)... method call.
Remote Debugging shows that when we get to the ReportDocument.Export(...)... it throws the exception, as noted before. There is no inner-exception to see.
The parameters are not null.
The parameters are set correctly.
I have changed the call to ReportDocument.ExportToDisk(...)... it changed nothing.
I have changed the file type to save, it changed nothing.
I have changed the folder/path in the Export call. I have used forward slashes, changed it to be right off the root of the drive 'C:\PDF\', it changed nothing.
I have tested access to the path by writing a file, to the path, with the same name that Crystal was supposed to use, it works, Crystal does not.
I have tried the different deployment types for the Crystal Reports for Visual Studio with the exception of Merge Modules (13_0_14 started with 13_0_13).
Other than the 64 bit, they gave the same results. 64 bit has other issues as you can imagine, as our deployed application is 32 bit.
This is not a new program, it is an uplift of a currently running program / report.
Current running system...
Windows Server 2003 / CrystalReports 2008 Runtime, Crystal Viewer...
This is a business critical piece of Software that really needs the uplift.
Any thoughts? Am I missing something? I will try anything that might be of use.
Is there a way I can escalate this issue?
Thanks much
John
Hi John,
Did you compile it to be 32 or 64 bit?
Can you run debugdiag (Microsoft) and set it for an exception? It may tell us what API it's failing in. I can get the PDB's for you also if we need them.
How about running your service as in console mode to capture more details?
All of the errors being returned are with Windows Services, have you asked Microsoft what these errors mean?
How about running the Service under the Local PC Admin account?
Don
Hello Don,
Thank you for your response.
> Did you compile it to be 32 or 64 bit?
It is compiled as 32bit.
>Can you run debugdiag (Microsoft) and set it for an exception? It may tell us what API it's failing in. I can get the PDB's for you also if we need them.
PDB's might help in debugging.
I installed and ran debugdiag (as per your suggestion). The output is too much info to post here, but the gist of it is:
***********************
* EXCEPTION SUMMARY *
***********************
|--------------------------------------------------------------|
| Count | Exception |
|--------------------------------------------------------------|
| 6 | 0XE06D7363 |
| 1 | System.Runtime.InteropServices.COMException |
| 1 | CrystalDecisions.ReportAppServer.ConvertDotNetToErom |
| 1 | CLR Exception |
|--------------------------------------------------------------|
> How about running your service as in console mode to capture more details?
I am already running in Visual Studio-debug mode via msvsmon and as such can see all lines of code (minus no-source code assemblies such as CR code) execute and inspect all variables as needed. What more could I possibly get out of running the process in console mode? I am not opposed to doing this, I just need a push.
> All of the errors being returned are with Windows Services, have you asked Microsoft what these errors mean?
I have not spoken w/ Microsoft about any of this. I have researched the exception by name and number, as well as looked for information on HResult number and ErrorCode number information found stuffed away in the innards of the exception.
> How about running the Service under the Local PC Admin account?
I am an admin on this development vm. I changed the account information to my credentials, it changed nothing.
Anything more I can look at?
Thanks much
John
| User | Count |
|---|---|
| 5 | |
| 4 | |
| 4 | |
| 3 | |
| 2 | |
| 2 | |
| 2 | |
| 2 | |
| 2 | |
| 2 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.