Hey All,
I was using crystal v8.5, then switched to v9. Code has not changed and yet I get this error message now when i try to export to another format:
Run-time exception thrown: System.NotSupportedException. Error in file c:\inetpub\ Operation not yet implemented.
Below is the code I use and I get the error on the pRpt.Export line. Can anybody give me a clue as to what is going on?
Dim ExportPath As String
ExportPath = Request.PhysicalApplicationPath
'If Directory.Exists(ExportPath) = False Then
' Directory.CreateDirectory(Request.PhysicalApplicationPath)
'End If
crDiskFileDestinationOptions = New CrystalDecisions.Shared.DiskFileDestinationOptions
oRpt.Load(Server.MapPath("") + "\" + strReportName)
crExportOptions = oRpt.ExportOptions()
Case "MS Excel (XLS)"
'Export to Excel
'append a filename to the export path and set this file as the filename property for
'the DestinationOptions class
crDiskFileDestinationOptions.DiskFileName = ExportPath + "Excel.xls"
'set the required report ExportOptions properties
With oRpt.ExportOptions
.ExportDestinationType = CrystalDecisions.Shared.ExportDestinationType.DiskFile
.ExportFormatType = CrystalDecisions.Shared.ExportFormatType.Excel
.DestinationOptions = crDiskFileDestinationOptions
End With
'--------------------------------------------------------------------
End Select 'export format
'Once the export options have been set for the report, the report can be exported. The Export command
'does not take any arguments
Try
' Export the report
oRpt.Export()
I was using crystal v8.5, then switched to v9. Code has not changed and yet I get this error message now when i try to export to another format:
Run-time exception thrown: System.NotSupportedException. Error in file c:\inetpub\ Operation not yet implemented.
Below is the code I use and I get the error on the pRpt.Export line. Can anybody give me a clue as to what is going on?
Dim ExportPath As String
ExportPath = Request.PhysicalApplicationPath
'If Directory.Exists(ExportPath) = False Then
' Directory.CreateDirectory(Request.PhysicalApplicationPath)
'End If
crDiskFileDestinationOptions = New CrystalDecisions.Shared.DiskFileDestinationOptions
oRpt.Load(Server.MapPath("") + "\" + strReportName)
crExportOptions = oRpt.ExportOptions()
Case "MS Excel (XLS)"
'Export to Excel
'append a filename to the export path and set this file as the filename property for
'the DestinationOptions class
crDiskFileDestinationOptions.DiskFileName = ExportPath + "Excel.xls"
'set the required report ExportOptions properties
With oRpt.ExportOptions
.ExportDestinationType = CrystalDecisions.Shared.ExportDestinationType.DiskFile
.ExportFormatType = CrystalDecisions.Shared.ExportFormatType.Excel
.DestinationOptions = crDiskFileDestinationOptions
End With
'--------------------------------------------------------------------
End Select 'export format
'Once the export options have been set for the report, the report can be exported. The Export command
'does not take any arguments
Try
' Export the report
oRpt.Export()