Welcome to the fracta.net forum!

Share your coding ideas or ask questions.

Question Excel VBA macro to automate Avaya CMS Supervisor reports

More
11 years 11 months ago - 11 years 11 months ago #100 by roller
There is no refresh method that you can trigger from VBA for historical reports as far as I am aware. What I usually do when I want to restart the same report for multiple days is I keep the connection, application and server objects alive and loop thru the rest of the code from this line downwards: ''cvsSrv.Reports.ACD = 1''

When you click restart from the menu I think you are re-running the entire code - like you said it is just a quick.

You can also try using the current instance of the server if you have the Avaya CMS application running instead of creating new ones - like this:

Set cvsApp = CreateObject("ACSUP.cvsApplication")
Set Rep = CreateObject("ACSREP.cvsReport")
Set cvsSrv = cvsApp.servers(1)

That last line will hook into the running application server instance. This method can save you from having the user ID and password in your code. It will work as long as you have the Avaya application running in the background.
Last edit: 11 years 11 months ago by roller.
The topic has been locked.
  • dilsteve
  • Visitor
  • Visitor
11 years 8 months ago #110 by dilsteve
Hello,
I am new to Avaya CMS Supervisor R16 but more seasoned on VBA. I have placed your nifty code into Excel 2010 but I am having problems after the CMS supervisor login. R16 opens acs_ssh.exe and logs in fine but then it asks me to "press Enter to continue". The code I used doesn't seem to support this new possibly automated script prevention step. After I press <enter> manually, then it states "Input terminal type (default xterm):".

I am wondering if anyone has experienced this and how they got through it.
The topic has been locked.
  • dilsteve
  • Visitor
  • Visitor
11 years 8 months ago #111 by dilsteve
Nevermind!
After a www search of "acs_ssh.exe", I came across a forum that helped introduce me to the logs, via Tools-> Options-> Scripting. The log file (I hit 'view log' on the bottom portion) told me I had an invalid path. I changed it to a simple 'c:\' and I got a report! Not only that, but acs_ssh.exe goes away when the job is complete so I don't have to worry about 'press enter to continue'.
:blush:
The topic has been locked.
More
11 years 8 months ago #112 by roller
Hi dilsteve I am having the same issue with the acs_ssh.exe window, what did you exactly do to get rid of it? can you post more details what you chnage to 'c:\' please?
The topic has been locked.
  • dilsteve
  • Visitor
  • Visitor
11 years 8 months ago #113 by dilsteve
I found out today my path was invalid because I did not handle spaces in the folder and file names properly. I overcame that by replacing the spaces with underscores. This is what my core run-the-report area looks like:

Sub RUN_Daily_Agt_Perf_REPORT()
Dim Info As Object, b As Variant

Set cvsRep = New cvsReport

cvsSrv.Reports.ACD = 1
Set Info = cvsSrv.Reports.Reports("Historical\CMS Custom\Daily Agt Perf")

If Info Is Nothing Then
MsgBox "Unable to find report"
Else
b = cvsSrv.Reports.CreateReport(Info, Rep)
If b Then
Rep.SetProperty "Skills", "1699;599"
Rep.SetProperty "Date", sDate

exportPath = "c:\"
exportName = "DailyAgtPerf_" + rDate + ".csv"

b = Rep.ExportData(exportPath & exportName, 9, 0, False, False, True)

Rep.Quit
End If
End If

Set cvsRep = Nothing
End Sub

The biggest differences I see between the code above and yours is b is a variant and the rep.exportdata has something in "".

Hope this helps.
The topic has been locked.
More
11 years 8 months ago #114 by roller
OK I get what you are saying but usually in VBA if you don't declare a variable it is of Variant type by default, so the b in my script would be Variant.

If you have export.report with "" then this means it will be copied in the clipboard. I do that sometimes to paste the report in Excel for furthur processing.

At my work we recently upgraded to CMS 16 and this "acs_ssh.exe" window started poping up and the script would pause until you press enter. The people in charge of the upgrade project contacted Avaya and they got a patch applied. No the "acs_ssh.exe" window still pops up but the script continues. I think they made it pick Default term type.

Thank you for sharing.
The topic has been locked.
Time to create page: 0.745 seconds
Powered by Kunena Forum