Tips Cognos 8 : sample Scripts Generate Cube menggunakan Security Option

Sub Main ()

'Declare variables

Dim objTrans As Object
Dim objModel As Object
Dim objCube As Object
Dim strModelPath As String
Dim strModelName As String
Dim strModelSource As String

'Assign values to the variables and create an instance of Transformer

strModelPath = "d:\Temp\"
strModelName = "sample.mdl"
strModelSource = strModelPath & strModelName

'Open Transformer

Set objTrans = CreateObject("CognosTransformer.Application.cer5")

'Open the model and log onto the common logon server

Set objModel = objTrans.OpenModel (strModelSource, "administrator","","Root User Class")

'Build the cubes

Set objCube = objModel.Cubes.Item(1)
ObjCube.CreateMDCFile


'Clean up

Set objTrans = Nothing
Set objModel = Nothing
Set objCube = Nothing

End Sub


setelah itu buat batch filenya;
contoh :
"c:\program files\cognos\cer5\bin\runmac32.exe" "c:\macros\macroname.mac"

Komentar

Postingan Populer