This is how I send a Crystal Report to a pdf format.
you can take away what you dont need
Public Sub ExportData(ByRef oRpt As Object)
Dim fs As IO.FileStream
Dim FileSize As Long
Dim oDest As New CrystalDecisions.Shared.DiskFileDestinationOptions
Dim ExportFileName As String = Server.MapPath("/") & ConfigurationSettings.AppSettings("ExportDir") & Session.SessionID & ".pdf"
Try
'Dim oExport As New CrystalDecisions.CrystalReports.Engine.ReportDocument.ExportOptions()
oRpt.ExportOptions.ExportDestinationType = CrystalDecisions.[Shared].ExportDestinationType.DiskFile
oRpt.ExportOptions.ExportFormatType = CrystalDecisions.[Shared].ExportFormatType.PortableDocFormat
oDest.DiskFileName = ExportFileName
oRpt.ExportOptions.DestinationOptions = oDest
oRpt.Export()
'Build Target Filename
'Send the file to the user that made the request
Response.Clear()
Response.Buffer = True
Response.AddHeader("Content-Type", "application/pdf")
' Response.AddHeader("Content-Disposition", "attachment;filename=" & Session.SessionID & ".pdf;")
fs = New IO.FileStream(ExportFileName, IO.FileMode.Open)
FileSize = fs.Length
Dim bBuffer(CInt(FileSize)) As Byte
fs.Read(bBuffer, 0, CInt(FileSize))
fs.Close()
Response.BinaryWrite(bBuffer)
Response.Flush()
Response.Close()
Catch e As Exception
End Try
End Sub