1234567891011121314151617181920212223242526272829303132333435363738 |
- Dim objApp As Object
- Dim objRep as Object
- Dim imrFile as String
- Dim catalogFile as String
- Dim exportFile As String
- Dim exportFormat As String
- Sub Main ()
-
- imrFile = GetField(Command, 1, ",")
- catalogFile = GetField(Command, 2, ",")
- exportFile = GetField(Command, 3, ",")
- exportFormat = GetField(Command, 4, ",")
-
-
- Set objApp = CreateObject("CognosImpromptu.Application")
- objApp.OpenCatalog catalogFile, "Ersteller"
- Set objRep = objApp.OpenReport(imrFile)
- objRep.RetrieveAll
- If exportFormat = "ims" Then
- objRep.ExportHotFile(exportFile)
- Else
- objRep.Export exportFile, exportFormat
- End If
- objRep.CloseReport
- objApp.Quit
- Set objRep = Nothing
- Set objApp = Nothing
- End Sub
|