--> At CallCenterOps.com we’re dedicated to providing information about operations management to those involved in real-time customer service via call centers.
Learn how to advertise on this site.
CCOps Home  |  Forum Home  |  Jobs Board  |  Library  |  Operations  |  Resources  |  In The News  |  Site Map

Go Back   CallCenterOps Forum > Technology Discussion
Register FAQ Calendar Search Today's Posts Mark Forums Read

Technology Discussion The CallCenterOps Technology Forum focuses on the technologies that make call centers work. (No advertising is accepted - posts will be removed.)

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 11-08-2006, 04:55 PM
Registered User
 
Join Date: Nov 2006
Posts: 0
Using Excel VBA to run Avaya CMS reports

I have imported the following references in the VBE window of M---cel 2000 (9.0.6926 SP-3):
Application component : acsApp.exe
Server component : acsSRV.exe
Connection component : cvsconn.dll
Report Component : acsRep.exe
Loggin and Error Handling Component : cvserr.dll
ACSLog - Error routing and logging : CVSLog.dll

I have a function "CMSGetReport" (with 9 parameters)
I have a sub "Pull_Report" which calls the "CMSGetReport" function and puts it in cell A1 of the workbook.

Question1: The above 6 references that I listed, do I really require them?
Question2: Do I require more references than these?
Question3: (Most important one). The function and the sub works fine. The only problem is that every time the function is executed, an instance of Server (acsSRV.exe) is added in the task manager. If I run this sub 10 times, there will be 10 instances of the Server. How do I eliminate this problem?


Code:
  Sub Pull_Report()
  Cells.ClearContents
  Range("A1").Select
  Call CMSGetReport("xx.xxx.xxx.xx", 2, "Historical\Designer\Summary Interval", "Splits/Skills", "Group", "Date", Date, "Times", "00:00-23:30")
  End Sub
Code:
  Public Function CMSGetReport( _
       sServerIP As String, _
       iACD As Integer, _
       sReportName As String, _
       sProperty1Name As String, _
       sProperty1Value As String, _
       sProperty2Name As String, _
       sProperty2Value As String, _
       Optional sProperty3Name As String, _
       Optional sProperty3Value As String) As Boolean
   
  Const Username As String = "1234"
  Const Password As String = "mypwd"
   
  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")
   
  If cvsApp.CreateServer(Username, "", "", sServerIP, False, "ENU", cvsSrv, cvsConn) Then
       If cvsConn.Login(Username, Password, sServerIP, "ENU") Then
       
           CMSGetReport = False
           
           On Error Resume Next
           cvsSrv.Reports.ACD = iACD
           Set Info = cvsSrv.Reports.Reports(sReportName)
           If Info Is Nothing Then
               If cvsSrv.Interactive Then
               MsgBox "The Report " & sReportName & " was not found on ACD" & iACD & ".", vbCritical Or vbOKOnly, "CentreVu Supervisor"
           Else
               Set Log = CreateObject("CVSERR.cvslog")
               Log.AutoLogWrite "The Report " & sReportName & " was not found on ACD" & iACD & "."
               Set Log = Nothing
           End If
       Else
           b = cvsSrv.Reports.CreateReport(Info, Rep)
           If b Then
               Debug.Print Rep.SetProperty(sProperty1Name, sProperty1Value)
               Debug.Print Rep.SetProperty(sProperty2Name, sProperty2Value)
               Debug.Print Rep.SetProperty(sProperty3Name, sProperty3Value)
               b = Rep.ExportData("", 9, 0, True, True, False)
               Rep.Quit
               CMSGetReport = True
               
               If Not cvsSrv.Interactive Then cvsSrv.ActiveTasks.Remove Rep.TaskID
                   Set Rep = Nothing
               End If
               
           End If
       
       Range("A1").Select
       ActiveSheet.Paste
       
       Set Log = Nothing
       Set Rep = Nothing
       Set cvsSrv = Nothing
       Set cvsConn = Nothing
       Set cvsApp = Nothing
       
       End If
  End If
          
  End Function
Reply With Quote
  #2 (permalink)  
Old 02-21-2007, 07:14 PM
Registered User
 
Join Date: Feb 2007
Posts: 0
Answer to Question 3:

I have found out that by adding the following code you can disconnect the server (and avoid having multiple instances).

cvsConn.Disconnect
cvsSrv.Disconnect
cvsApp.Disconnect

I added this code just before you release your variables with the set = nothing lines.

Cheers,

That_tech_guy
Reply With Quote
  #3 (permalink)  
Old 03-26-2007, 11:12 AM
Registered User
 
Join Date: Nov 2006
Posts: 0
Re: Using Excel VBA to run Avaya CMS reports

Answer 3: move cvsApp, cvsConn and cvsSrv out of the sub and make them global variables. And below mentioned code should be out of the sub
Set cvsApp = CreateObject("ACSUP.cvsApplication")
Set cvsConn = CreateObject("ACSCN.cvsConnection")
Set cvsSrv = CreateObject("ACSUPSRV.cvsServer")
Then remove the following statments
Set Log = Nothing
Set Rep = Nothing
Set cvsSrv = Nothing
Set cvsConn = Nothing
Set cvsApp = Nothing

If you want to keep the code clean then create a seperate function (Sub) with the above statments which should be executed on close of the Excel workbook.

Answer 2: you don't need any extra references.
Answer 1: I have used VBScript and didn't have to use acsSRV.exe
You might want to give it a try.
Reply With Quote
  #4 (permalink)  
Old 04-18-2008, 07:27 AM
Registered User
 
Join Date: Apr 2008
Posts: 0
Run-time error 5

anyone, HI i'm Newbie please advice

went i run code above i got an error "Invalid procedure call or argument"

what sholud i do?
Reply With Quote
  #5 (permalink)  
Old 04-18-2008, 08:06 AM
Registered User
 
Join Date: Apr 2008
Posts: 0
Error

HI All,

i'm newbie here, please advice

when i run code above, i got an error

"180539 4 2 -5 [06]acsRep cvsReport:Run:00010 -- '*Real-Time\Agent\Agent Report: VB error (5) Invalid procedure call or argument' "

can anyone help me
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is On
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
using C# to run Avaya CMS reports madhombre Technology Discussion 27 05-13-2008 07:01 PM
Re-running jobs on AVAYA Dialer Walter General Discussion 0 09-19-2006 03:45 AM
Avaya Voice mail LED Glows even when there are no new voice mails. CreativeWolf Technology Discussion 2 02-10-2006 05:19 AM


All times are GMT -4. The time now is 08:26 AM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
CallCenterOps Presentation Copyright © 1998 -
Legal Notice