cathiec Posted June 28, 2005 Posted June 28, 2005 Hi! I am trying to export to PDF using vb.net and crystal. here is the code that i am using: Private Sub Export() Dim ExportPath As String = Request.PhysicalApplicationPath Dim crReportDocument As CrystalReport1 = New CrystalReport1() crReportDocument.SetDataSource(Me.DataSet1) crDiskFileDestinationOptions = New DiskFileDestinationOptions crExportOptions = crReportDocument.ExportOptions Session("filename") = Session.SessionID.ToString() & ".pdf" crDiskFileDestinationOptions.DiskFileName = ExportPath & Session("filename").ToString() crExportOptions.DestinationOptions = crDiskFileDestinationOptions crExportOptions.ExportDestinationType = ExportDestinationType.DiskFile crExportOptions.ExportFormatType = ExportFormatType.PortableDocFormat crReportDocument.Export() Response.Redirect("WebForm2.aspx") End Sub i have imported the crytal namespaces that i need and i have added references to the project too. i have a crystal report called CrystalReport1 also. but i keep getting the error "Type 'CrystalReport1' is not defined" Would really appreciate any help on this. thanks and regards Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.