Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. ASP.NET
  4. what should i do with crystal report export error?

what should i do with crystal report export error?

Scheduled Pinned Locked Moved ASP.NET
csharphelpasp-netvisual-studiodata-structures
4 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    M Offline
    m rastgar
    wrote on last edited by
    #1

    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

    G 1 Reply Last reply
    0
    • M m 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

      G Offline
      G Offline
      GaryWoodfine
      wrote on last edited by
      #2

      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

      M N 2 Replies Last reply
      0
      • G GaryWoodfine

        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

        M Offline
        M Offline
        m rastgar
        wrote on last edited by
        #3

        How can I set full access for this folder? Please explain it step by step if it is possible:-D. Thanks Rastgar

        1 Reply Last reply
        0
        • G GaryWoodfine

          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

          N Offline
          N Offline
          Nisha_D
          wrote on last edited by
          #4

          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

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups