Welcome to the fracta.net forum!

Share your coding ideas or ask questions.

Question Excel VBA macro to automate Avaya CMS Supervisor reports

  • yesudass
  • Visitor
  • Visitor
9 years 5 months ago #465 by yesudass
Hello...can any one help on this as i have tried 3 times by executing the code but i am still not able to get the data in sheet 1...mentioned below is the code for your reference. trying to extract the agent trace report from excel.

Public Sub CMSConn()
Dim cvsApp As Object
Dim cvsConn As Object
Dim cvsSrv As Object
Dim Rep As Object
Dim Info As Object, Log As Object, b As Object

Set cvsApp = CreateObject("ACSUP.cvsApplication")
Set cvsConn = CreateObject("ACSCN.cvsConnection")
Set cvsSrv = CreateObject("ACSUPSRV.cvsServer")
Set Rep = CreateObject("ACSREP.cvsReport")
'serverAddress = "syd-aesc-cms1"
serverAddress = "148.172.134.74"
mydate = "10/28/2014"
UserName = "ykumar"
passW = "Kumar1"
agentName = "53096"
If cvsApp.CreateServer(UserName, "", "", serverAddress, False, "ENU", cvsSrv, cvsConn) Then
If cvsConn.login(UserName, passW, serverAddress, "ENU") Then
On Error Resume Next
cvsSrv.Reports.ACD = 1
Set Info = cvsSrv.Reports.Reports("Historical\Agent\Trace by Location")
If Info Is Nothing Then
If cvsSrv.Interactive Then
MsgBox "The Report " & "Historical\Agent\Trace by Location" & " was not found on ACD 1", vbCritical Or vbOKOnly, "CentreVu Supervisor"
Else
Set Log = CreateObject("ACSERR.cvslog")
Log.AutoLogWrite "The Report " & "Historical\Agent\Trace by Location" & " was not found on ACD 1"
Set Log = Nothing
End If
Else
b = cvsSrv.Reports.CreateReport(Info, Rep)
If b Then
Debug.Print Rep.SetProperty("Agent", agentName)
Debug.Print Rep.SetProperty("Dates", mydate)
Debug.Print Rep.SetProperty("Times", "00:00-23:59")
b = Rep.ExportallData("", 9, 0, False, True, True)
Set wk = ThisWorkbook
wk.Sheets(1).Cells.ClearContents
wk.Sheets(1).Cells(1, 1).PasteSpecial xlPasteValues

'b = Rep.ExportData(fileP, 9, 0, False, True, True)


Rep.Quit
If Not cvsSrv.Interactive Then cvsSrv.ActiveTasks.Remove Rep.TaskID
Set Rep = Nothing
End If
End If

Set Info = Nothing
End If

End If

cvsConn.logout
cvsConn.Disconnect
cvsSrv.Connected = False
Set Log = Nothing
Set Rep = Nothing
Set cvsSrv = Nothing
Set cvsConn = Nothing
Set cvsApp = Nothing
MsgBox "completed"
End Sub
The topic has been locked.
More
9 years 5 months ago - 9 years 5 months ago #466 by roller
Can you tell us if you are seeing any errors? Also in the vba editor go to the menu and show the window that displays the debug messages, does it show true 3 times for each of the lines in your code where the properties are set?
Last edit: 9 years 5 months ago by roller.
The topic has been locked.
  • yesudass
  • Visitor
  • Visitor
9 years 5 months ago #467 by yesudass
Hello I do not see any error while executing the macros...the entire macros is been executed and i get a message box stating the macros have completed executing...Please note:- i have tried executing the macros while logged in and logged off as well.

but still no luck.
The topic has been locked.
More
9 years 5 months ago #468 by roller
Replace the
Debug.Print Rep.SetProperty( bits with
msgbox Rep.SetProperty(

Do it for all three and run it. Tell me if the message box says true or false?
The topic has been locked.
  • rander
  • Visitor
  • Visitor
9 years 5 months ago #469 by rander
hello roller, its rander again. We've migrated from CMS13 to CMS16 and now my macros all error out, "Compile Error: Can't find object or library"
and it highlights the line of code "Dim Rep As New ACSREP.cvsReport". Tried just having "Dim Rep as Object" and still doesn't run. I'm mainly concerned on my Trace by location macros as they greatly reduced the time spent pulling that data. Any hints?
The topic has been locked.
More
9 years 5 months ago - 9 years 5 months ago #470 by roller
You have to unselect then reselect the Report Component reference as it has changed between those two versions. In the VBA editor go to Tools>References, un-tick the missing Report Component Reference from the top of the list and then reselect the same thing but from further down the list.

This thread is getting too long, I will lock it. Please start a new topic.
Last edit: 9 years 5 months ago by roller.
The topic has been locked.
Time to create page: 0.451 seconds
Powered by Kunena Forum