Last post Nov 11, 2011 06:17 PM by jackmonterrey
Aug 27, 2010 02:50 AM|ray.csw|LINK
I sometimes get the following error while printing crystal report to pdf:
System.Runtime.InteropServices.COMException (0x80004005): The process cannot access the file because
it is being used by another process. 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.ReportDocument.ExportToStream(ExportOptions options) at
CrystalDecisions.CrystalReports.Engine.ReportDocument.ExportToStream(ExportFormatType formatType) at
CommonWA.CommonFunc.GetPDFMemoryStream(DCMSReportDoc _dcmsreportdoc, Boolean& _DataExist) in E:\wwwroot\ASPWA\CommonWA\CommonCom.vb:line 382
The error not occurs frequently but sometimes it will happen, can someone tell me why the error occurs and how can I solve the problem?
Thank you very much.
Aug 27, 2010 04:09 AM|iGulfam|LINK
It means the required file is already occupied by ASP .Net process. Hence can not be changed.
Aug 27, 2010 04:16 AM|ray.csw|LINK
I would like to ask what file is occupied? Is it the report document? I have already disposed the report document once the pdf is generated. How can I solve the problem?
Aug 29, 2010 11:00 PM|ray.csw|LINK
Does anyone can help? Is the crystal report being used by other program? Does it helps if I change the open method of the crystal report to CrystalDecisions.Shared.OpenReportMethod.OpenReportByTempCopy?
Which method should be used usually? CrystalDecisions.Shared.OpenReportMethod.OpenReportByTempCopy or CrystalDecisions.Shared.OpenReportMethod.OpenReportByDefault?
Thanks a lot,
Jun 20, 2011 03:36 AM|NaveedAli67|LINK
Ray did you get any proper solution to this problem? pls share if any.
Nov 11, 2011 06:17 PM|jackmonterrey|LINK
Does anyone find a solution to this problem ?