PDA

Click to See Complete Forum and Search --> : need help in crystal report


binilmb
Apr 6th, 2006, 06:52 AM
hi
im new to crystal report. how can i call it in vb and is there any way to save the report to .pdf file

Hack
Apr 6th, 2006, 07:00 AM
Moved to reporting section.

binilmb
Apr 6th, 2006, 07:20 AM
how can i call crystal report in vb

Al42
Apr 6th, 2006, 01:25 PM
This is a snippet from a VB.Net program I wrote, but you may be able to adapt it to VB:

Imports CrystalDecisions.CrystalReports.Engine
Imports CrystalDecisions.Shared

Dim CrystalReportDocument As ReportDocument
Dim CrystalExportOptions As ExportOptions
Dim CrystalDiskFileDestinationOptions As DiskFileDestinationOptions

Dim Filename As String
CrystalReportDocument = New ReportDocument()
CrystalReportDocument.Load("Path" & "CrystalReportTemplateName.rpt")

Filename = "C:\FileName.pdf"

CrystalDiskFileDestinationOptions = New DiskFileDestinationOptions()
CrystalDiskFileDestinationOptions.DiskFileName = Filename
CrystalExportOptions = CrystalReportDocument.ExportOptions
With CrystalExportOptions
.DestinationOptions = CrystalDiskFileDestinationOptions '<- This is what makes it save the report on disk
.ExportDestinationType = ExportDestinationType.DiskFile
.ExportFormatType = ExportFormatType.PortableDocFormat '<- This is what makes it save it as a pdf document
End With
CrystalReportDocument.Export()

PeterBorroloola
Apr 11th, 2006, 03:25 AM
what version crystal reports and vb?