Welcome to the fracta.net forum!

Share your coding ideas or ask questions.

Question VBA automating CMS Supervisor R17

  • tachfine
  • Topic Author
  • Visitor
  • Visitor
7 years 7 months ago #625 by tachfine
VBA automating CMS Supervisor R17 was created by tachfine
Hello,

i work in a call center, and i have a problem automating my CMS's reports, i used all codes, but nothing happened, i used this code:

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 = "172.17.42.244"
mydate = "08/08/2016"
UserName = "CETELEMA"
passW = "CETELEMA"
Group = "487"
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\Designer\FGR_seuil_per_interval_per_split_Renault")
If Info Is Nothing Then
If cvsSrv.Interactive Then
MsgBox "The Report " & "Historical\Designer\FGR_seuil_per_interval_per_split_Renault" & " was not found on ACD 1", vbCritical Or vbOKOnly, "CentreVu Supervisor"
Else
Set Log = CreateObject("ACSERR.cvslog")
Log.AutoLogWrite "The Report " & "Historical\Designer\FGR_seuil_per_interval_per_split_Renault" & " 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("Group", Group)
Debug.Print Rep.SetProperty("Dates", mydate)
Debug.Print Rep.SetProperty("Times", "00:00-23:59")
b = Rep.ExportData("", 9, 0, False, True, True)
Set wk = ThisWorkbook
wk.Sheets(1).Cells.ClearContents
wk.Sheets(1).Cells(1, 1).PasteSpecial

'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


End Sub


I'm using Excel 2010, when the code start, i don't have any error message, i checked if the report was empty, it wasn't.

here's as attachement, a screen of CMS and the type of report i want to use.

Waiting for your precious help, thank'you.
Attachments:

Please Log in or Create an account to join the conversation.

More
7 years 7 months ago #626 by roller
Could be a number of things. Does your report take a date range or a single date? If a single date then change the set property to Date from Dates. That's the first thing to check.

Please Log in or Create an account to join the conversation.

  • tachfine
  • Topic Author
  • Visitor
  • Visitor
7 years 7 months ago #627 by tachfine
Replied by tachfine on topic VBA automating CMS Supervisor R17
Only one date, and no results, need you the log file so you can detect the error?

Thank you, this will help me a lot

Please Log in or Create an account to join the conversation.

More
7 years 7 months ago #628 by roller
I want to confirm that you changed the line
Debug.Print Rep.SetProperty("Dates", mydate)

To
Debug.Print Rep.SetProperty("Date", mydate)

And you still got no results?

Can you save the CMS script for this report on your desktop and open it using Notepad. Copy the text and post it here.

Please Log in or Create an account to join the conversation.

  • tachfine
  • Topic Author
  • Visitor
  • Visitor
7 years 7 months ago #629 by tachfine
Replied by tachfine on topic VBA automating CMS Supervisor R17
Nothing happened, actually i have like 40 erports to do every day and doing it by VBA will change everything, i know that you wont like it if i say it, but if everything goes well, your website should have a donation. thank'you very much.

Script:

08-10-2016 09:41:44 Entering cvsConnection.Login
08-10-2016 09:41:44 Entering cvsConnection.Login
08-10-2016 09:41:48 Entering m_msgr_DaleConnection(lType=14)
08-10-2016 09:41:48 m_msgr_DaleConnection(): m_iConnectionStatus=4588 (csTerminalOK)
08-10-2016 09:41:48 m_msgr_DaleConnection() call NotifyStatus
08-10-2016 09:41:48 3001:Do_Login(): entering login script
08-10-2016 09:41:48 3001:Do_Login(): test of Log_NORMAL
08-10-2016 09:41:48 3001:Do_Login(): test of Log_MINIMAL
08-10-2016 09:41:48 3001:Do_Login(): Select Case LoginState (7384)
08-10-2016 09:41:48 3001:Do_Login(): cpWaiting (7384)
08-10-2016 09:41:48 3001:Do_Login(): Check for login before clearing buffer
08-10-2016 09:41:48 CheckFor:login
08-10-2016 09:41:48 Buffer =
08-10-2016 09:41:48 WaitFor:login Timeout:3
08-10-2016 09:41:48 Buffer =
08-10-2016 09:41:50 Match code:
08-10-2016 09:41:50 sInputBuffer =
login: login:
08-10-2016 09:41:50 sWaitText = login
08-10-2016 09:41:50 b = True
08-10-2016 09:41:50 3001:Do_Login(): login found in buffer after waiting, send user and move to cpSendingLogin
08-10-2016 09:41:50 3001:Do_Login(): Select Case LoginState (7274)
08-10-2016 09:41:50 3001:Do_Login(): cpSendingLogin (7274)
08-10-2016 09:41:51 3001:Do_Login(): detected some form of password prompt
08-10-2016 09:41:51 3001:Do_Login(): cpSendingLogin: tmp=CETELEMA COW=1
Password:
08-10-2016 09:41:51 3001:Do_Login(): cpSendingLogin: password prompt detected
08-10-2016 09:41:51 3001:Do_Login(): Select Case LoginState (7277)
08-10-2016 09:41:51 3001:Do_Login(): cpSendingPwd (7277)
08-10-2016 09:41:51 3001:Do_Login(): cpSendingPwd i=1
08-10-2016 09:41:52 3001:Do_Login(): cpSendingPwd: AUTOMATIC detected
08-10-2016 09:41:52 3001:Do_Login(): Select Case LoginState (7197)
08-10-2016 09:41:52 3001:Do_Login(): cpPwdVerified (7197)
08-10-2016 09:41:52 3001:Do_Login(): Select Case LoginState (7067)
08-10-2016 09:41:52 3001:Do_Login(): cpConnected (7067)
08-10-2016 09:41:52 3001:Do_Login(): exiting login script
08-10-2016 09:41:52 Entering m_msgr_DaleConnection(lType=19)
08-10-2016 09:41:52 m_msgr_DaleConnection(): m_iConnectionStatus=7067 (csConnect)
08-10-2016 09:41:52 m_msgr_DaleConnection() call NotifyStatus
08-10-2016 09:41:53 Entering m_msgr_DaleConnection(lType=12)
08-10-2016 09:41:53 m_msgr_DaleConnection(): m_iConnectionStatus=5007 (csConnectionUp)
08-10-2016 09:41:53 m_msgr_DaleConnection() call NotifyStatus
08-10-2016 09:41:56 Login: Get ConnectionStatus() =5007
08-10-2016 09:41:57 Visual Vector Client application not installed.
08-10-2016 09:42:05 CreateServer: TEST AutoLogWrite NORMAL sUserName=CETELEMA, sServer=172.17.42.244, sLanguage=ENU
08-10-2016 09:42:05 CreateServer: TEST AutoLogWrite MINIMAL sUserName=CETELEMA, sServer=172.17.42.244, sLanguage=ENU
08-10-2016 09:42:06 Entering cvsConnection.Login
08-10-2016 09:42:06 Entering cvsConnection.Login
08-10-2016 09:42:09 Entering m_msgr_DaleConnection(lType=14)
08-10-2016 09:42:09 m_msgr_DaleConnection(): m_iConnectionStatus=4588 (csTerminalOK)
08-10-2016 09:42:09 m_msgr_DaleConnection() call NotifyStatus
08-10-2016 09:42:09 3001:Do_Login(): entering login script
08-10-2016 09:42:09 3001:Do_Login(): test of Log_NORMAL
08-10-2016 09:42:09 3001:Do_Login(): test of Log_MINIMAL
08-10-2016 09:42:09 3001:Do_Login(): Select Case LoginState (7384)
08-10-2016 09:42:09 3001:Do_Login(): cpWaiting (7384)
08-10-2016 09:42:09 3001:Do_Login(): Check for login before clearing buffer
08-10-2016 09:42:09 CheckFor:login
08-10-2016 09:42:09 Buffer =
08-10-2016 09:42:09 WaitFor:login Timeout:3
08-10-2016 09:42:09 Buffer =
08-10-2016 09:42:10 Match code:
08-10-2016 09:42:10 sInputBuffer =
login: login:
08-10-2016 09:42:10 sWaitText = login
08-10-2016 09:42:10 b = True
08-10-2016 09:42:10 3001:Do_Login(): login found in buffer after waiting, send user and move to cpSendingLogin
08-10-2016 09:42:10 3001:Do_Login(): Select Case LoginState (7274)
08-10-2016 09:42:10 3001:Do_Login(): cpSendingLogin (7274)
08-10-2016 09:42:12 3001:Do_Login(): detected some form of password prompt
08-10-2016 09:42:12 3001:Do_Login(): cpSendingLogin: tmp=CETELEMA COW=1
Password:
08-10-2016 09:42:12 3001:Do_Login(): cpSendingLogin: password prompt detected
08-10-2016 09:42:12 3001:Do_Login(): Select Case LoginState (7277)
08-10-2016 09:42:12 3001:Do_Login(): cpSendingPwd (7277)
08-10-2016 09:42:12 3001:Do_Login(): cpSendingPwd i=1
08-10-2016 09:42:12 3001:Do_Login(): cpSendingPwd: AUTOMATIC detected
08-10-2016 09:42:12 3001:Do_Login(): Select Case LoginState (7197)
08-10-2016 09:42:12 3001:Do_Login(): cpPwdVerified (7197)
08-10-2016 09:42:12 3001:Do_Login(): Select Case LoginState (7067)
08-10-2016 09:42:12 3001:Do_Login(): cpConnected (7067)
08-10-2016 09:42:12 3001:Do_Login(): exiting login script
08-10-2016 09:42:12 Entering m_msgr_DaleConnection(lType=19)
08-10-2016 09:42:12 m_msgr_DaleConnection(): m_iConnectionStatus=7067 (csConnect)
08-10-2016 09:42:12 m_msgr_DaleConnection() call NotifyStatus
08-10-2016 09:42:13 Entering m_msgr_DaleConnection(lType=12)
08-10-2016 09:42:13 m_msgr_DaleConnection(): m_iConnectionStatus=5007 (csConnectionUp)
08-10-2016 09:42:13 m_msgr_DaleConnection() call NotifyStatus
08-10-2016 09:42:28 The Report Historical\Agent\Trace by Location was not found on ACD 1
08-10-2016 09:42:29 Login: SetConnectionStatus(iNewStatus=5036, sMsg=)
08-10-2016 09:42:29 Entering m_msgr_DaleConnection(lType=13)
08-10-2016 09:42:29 m_msgr_DaleConnection(): m_iConnectionStatus=5036 (csConnectionDown)
08-10-2016 09:42:29 m_msgr_DaleConnection() call NotifyStatus

Please Log in or Create an account to join the conversation.

More
7 years 7 months ago - 7 years 7 months ago #630 by roller
That doesn't look like the content of the script. Is this the log file you posted?

Do this, generate the report in avaya. From the report click on file from the menu the select script. Save the script on your desktop, it will have an extension like .acauto or similar i can't remember. Then open notepad and drag that file into it. You should see some code similar to VBA.try that and place the code in here please.

Where are you from? ??
Last edit: 7 years 7 months ago by roller.

Please Log in or Create an account to join the conversation.

Time to create page: 0.995 seconds
Powered by Kunena Forum