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:
But I am not able to see the error details.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 %>




Reply With Quote