Hello,
I want to export data directly from Crystal Report to PDF. But I want to export only the selected records. For this i am using following codeBut I am getting the error as "Server Not Open"Code:Dim appl As New CRAXDDRT.Application Dim rep As CRAXDDRT.Report Set rep = appl.OpenReport(App.Path & "\Reports\pro_8_Eng.rpt", 1) rep.RecordSelectionFormula = "{Pro8.VillageNo} = " & cmbVillage.ItemData(cmbVillage.ListIndex) rep.ExportOptions.DiskFileName = App.Path & "\Reports\pdf_report.pdf" rep.ExportOptions.DestinationType = crEDTDiskFile rep.ExportOptions.FormatType = crEFTPortableDocFormat rep.Export False
If I comment the RecordSelectionFormula line then it dosen't give any error but it generates the PDF for all the rows in the Data.
I am using CR 8.5
Thanx...




Reply With Quote