Running Crystal Reports via VBS Script

Sep 20, 2005 0 Replies

I am currently running Symposium Server 5. We are also using remedy for ticket tracking. I have a VBS script that connects to the Remedy Oracle Database and runs reports daily, but can not figure out how to make the VBS script connect to the Symposium Database. Here is the VBS script I am using for Remedy:


'

Option Explicit



Dim oApp



Set oApp = CreateObject("CrystalRuntime.Application") Dim oRpt Set oRpt = oApp.OpenReport("C:\\RemedyStats\\Automation\\CrystalVB\\RITSD.rpt",1) oRpt.DiscardSavedData



Dim Table For Each Table in oRpt.Database.Tables Table.SetLogonInfo "ARDBC","miaremedyapp01","RITSDRPT","XXXXXX" Next



Dim FileSystemObject Dim FolderPath2 DIM FolderPath1 Dim FolderObject Set FileSystemObject = CreateObject("Scripting.FileSystemObject") FolderPath2 = "H:\\automation\\" FolderPath1 = "C:\\RemedyStats\\Automation\\" 'Set FolderObject = FileSystemObject.CreateFolder(CStr(FolderPath2)) 'Set FolderObject = FileSystemObject.CreateFolder(CStr(FolderPath1))


Dim ExportOptions Set ExportOptions = oRpt.ExportOptions ExportOptions.FormatType = 31 ExportOptions.DestinationType = 1 ExportOptions.DiskFileName = FolderPath2 & "RITSD.pdf" ExportOptions.DiskFileName = FolderPath1 & "RITSD.pdf"



oRpt.Export False ' '



Any assistance will be greatly appreciated.


Join the Discussion

Have something to add? Share your thoughts — no account required.

Didn't find your answer?

Ask the community — no account required