Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Report Document export was working now not??

Status
Not open for further replies.

majordog

Programmer
Jul 8, 2002
222
0
0
CA
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()
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top