daily pastebin goal
70%
SHARE
TWEET

export crystal report to text delimited

a guest Oct 16th, 2013 192 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. Dim oApp, oRpt  
  2. vFilenameReport = UCase("C:\Customer Folders\Folder\Report.rpt")
  3. vFilenameExport = UCase("C:\Customer Folders\Folder\Report.txt")
  4.   Set oApp =CreateObject("CrystalRuntime.Application")  
  5.   Set oRpt = oApp.OpenReport(vFilenameReport, 1)  
  6.   oRpt.DisplayProgressDialog = False  
  7.   oRpt.MorePrintEngineErrorMessages = False  
  8.   oRpt.EnableParameterPrompting = False  
  9.   oRpt.DiscardSavedData
  10.   Set dbproperties = oRpt.Database.Tables.Item(1).ConnectionProperties
  11.   dbproperties("User ID") = "XXXX"
  12.   dbproperties("Password") = "XXXX"  
  13.   oRpt.ExportOptions.DiskFileName = vFilenameExport  
  14.   oRpt.ExportOptions.FormatType = 9                   '9=>Text Delimited  
  15.  oRpt.ExportOptions.DestinationType = 1              '1=>filesystem  
  16.  oRpt.Export(False)
RAW Paste Data
Top