in my case crystal report needed to access some shared folder on the server.
because program was moved to another server, it couldn't find this folder.
DataLib.BackOffice_Close()
DataLib.BackOffice_Open()
crDiskFileDestinationOptions.DiskFileName = fileLocation & Private Sub ExportPDF(ByVal strLocID As String, ByVal strInvID As String)Dim crExportOptions As ExportOptionsDim crDiskFileDestinationOptions As New DiskFileDestinationOptionsDim crFormatTypeOptions As New PdfRtfWordFormatOptionsDim fileLocation As String = file://servername/folder%20name/"INV_" & strLocID & "_" & strInvID & ".pdf"strPDFFileLocation = crDiskFileDestinationOptions.DiskFileName
Session.Item(
crExportOptions = crDoc.ExportOptions
.ExportDestinationType = ExportDestinationType.DiskFile
.ExportFormatType = ExportFormatType.PortableDocFormat
.DestinationOptions = crDiskFileDestinationOptions
.FormatOptions = crFormatTypeOptions
"AttachmentLocation") = strPDFFileLocationWith crExportOptionsEnd WithTry crDoc.Export()
Response.Write(ex.Message)
Response.End()
Catch ex As ExceptionEnd TryEnd Sub
No comments:
Post a Comment