Results 1 to 1 of 1

Thread: [RESOLVED] Crystal Report - Export error

Threaded View

  1. #1

    Thread Starter
    Fanatic Member snufse's Avatar
    Join Date
    Jul 2004
    Location
    Jupiter, FL
    Posts
    912

    Resolved [RESOLVED] Crystal Report - Export error

    I have an ASP (.Net 2005) using CR 11.5.

    I am trying to export the report to a folder on another server and when I run the program it tells me that "resource is not found". It works fine on my local PC but not on the web server. I get error on the "myCrystalReport1.Export()" statement. (I am able to display the report). Any ideas?

    Code:
    Imports CrystalDecisions.CrystalReports.Engine
    
    Imports CrystalDecisions.Shared
    
    Imports CrystalDecisions.ReportSource
    
    Imports CrystalDecisions.Web



    Code:
    Private Function SaveDocument(ByVal DocumentName As String, ByVal Message1 As String) As String
    
            Try
             myCrystalReport1 = Session("myCrystalReport1")
             Dim DiskOpts As CrystalDecisions.Shared.DiskFileDestinationOptions = New CrystalDecisions.Shared.DiskFileDestinationOptions
             myCrystalReport1.ExportOptions.ExportDestinationType = CrystalDecisions.[Shared].ExportDestinationType.DiskFile
             myCrystalReport1.ExportOptions.ExportFormatType = CrystalDecisions.[Shared].ExportFormatType.PortableDocFormat
             DiskOpts.DiskFileName = ViewState("FilePath") & "\" & DocumentName & ".pdf"
             myCrystalReport1.ExportOptions.DestinationOptions = DiskOpts
             myCrystalReport1.Export()     
             Message1 = "Daily Sales Report: " & DocumentName & " successfully saved to folder C:\Program Files\Astec\DailySalesReports"
            Catch ex As Exception
             ErrorIndicator = True
             Message1 = "Daily Sales Report: " & DocumentName & " an error occurred saving the report to .pdf format " & ex.ToString
             End Try
    
            Return (Message1)
    
    End Function

    In order to see the error details, I've added foloowing to the mark up:

    Code:
    <%
    On Error Resume Next
    If Err.Number <> 0 Then 'if there is an error 
    Response.Write(Err.Number) 'write out the error number
    Response.Write(Err.Source) 'write out the error source
    Response.Write(Err.Description) 'write out the error description
    End If
    %>
    But I am not able to see the error details.
    Last edited by snufse; Jun 4th, 2009 at 10:21 AM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width