If am trying to use tha sane code but it is giving me an error as "Server Not Open".
The only thing is that I am using RecordSelectionFormula.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 try to run the above code without RecordSelectionFormula then it work fine...
Any suggestion...
Regards.




Reply With Quote