what should i do with crystal report export error?
-
I use crystal report to export pdf file in my web application. My crystal report file name is testreport. I user these commands to export: testreport report = new testreport(); report.ExportToDisk(CrystalDecisions.Shared.ExportFormatType.PortableDocFormat, "aaa.pdf"); But when I run it I have error: "Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. Exception Details: CrystalDecisions.CrystalReports.Engine.LoadSaveReportException: Error in File C:\DOCUME~1\EHSAN-~1\ASPNET\LOCALS~1\Temp\temp_5a2db3c1-f7ea-455d-a5c1-c37a91b5f8a9.rpt: Access to report file denied. Another program may be using it." I never use this file:"C:\DOCUME~1\EHSAN-~1\ASPNET\LOCALS~1\Temp\temp_5a2db3c1-f7ea-455d-a5c1-c37a91b5f8a9.rpt" But the error is that file is in use. Please help me. I develop with visual studio 2003, my language C#.net. Thanks Rastgar
-
I use crystal report to export pdf file in my web application. My crystal report file name is testreport. I user these commands to export: testreport report = new testreport(); report.ExportToDisk(CrystalDecisions.Shared.ExportFormatType.PortableDocFormat, "aaa.pdf"); But when I run it I have error: "Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. Exception Details: CrystalDecisions.CrystalReports.Engine.LoadSaveReportException: Error in File C:\DOCUME~1\EHSAN-~1\ASPNET\LOCALS~1\Temp\temp_5a2db3c1-f7ea-455d-a5c1-c37a91b5f8a9.rpt: Access to report file denied. Another program may be using it." I never use this file:"C:\DOCUME~1\EHSAN-~1\ASPNET\LOCALS~1\Temp\temp_5a2db3c1-f7ea-455d-a5c1-c37a91b5f8a9.rpt" But the error is that file is in use. Please help me. I develop with visual studio 2003, my language C#.net. Thanks Rastgar
I have never used Crystal reports , so not really familiar with this error, but what I would think that CR is probably creating a temporary file that it will use to create the report, and to do this the ASP net worker process may need access to that directory so I would check that the worker process had read/write permission to your temporary folder It's just a guess,
Kind Regards, Gary
My Website || My Blog || My Articles
-
I have never used Crystal reports , so not really familiar with this error, but what I would think that CR is probably creating a temporary file that it will use to create the report, and to do this the ASP net worker process may need access to that directory so I would check that the worker process had read/write permission to your temporary folder It's just a guess,
Kind Regards, Gary
My Website || My Blog || My Articles
-
I have never used Crystal reports , so not really familiar with this error, but what I would think that CR is probably creating a temporary file that it will use to create the report, and to do this the ASP net worker process may need access to that directory so I would check that the worker process had read/write permission to your temporary folder It's just a guess,
Kind Regards, Gary
My Website || My Blog || My Articles
Copy this code in button click for transfering crystal report data to pdf format:The pdf will be stored inside the project location that for example C:\Documents and Settings\Administrator\My Documents\Visual Studio 2005\WebSites\WebSite2 Dim rptExcel As New ReportDocument Dim strExportFile As String = Server.MapPath(".") & "/Reports.pdf" rptExcel.Load(Server.MapPath("CrystalReport.rpt")) rptExcel.ExportOptions.ExportDestinationType = ExportDestinationType.DiskFile rptExcel.ExportOptions.ExportFormatType = ExportFormatType.PortableDocFormat Dim objOptions As DiskFileDestinationOptions = New DiskFileDestinationOptions objOptions.DiskFileName = strExportFile rptExcel.ExportOptions.DestinationOptions = objOptions rptExcel.Export() objOptions = Nothing rptExcel = Nothing