PBXtech.info  
\'\'

Go Back   PBXtech.info > Avaya > Definity Servers

Reply
 
LinkBack Thread Tools Display Modes
Old June 8th, 2004, 01:37 PM   #1 (permalink)
rcotten
 
Join Date: Feb 2004
Posts: 12
rcotten is on a distinguished road
CMS Supervisor auto scripts

I know you can create scripts in CMS Supervisor but is there some way (VBA?) to have that script run a range of data for you?

Here is my script... What I want to do is have it read a list of agent ids from a txt file by changing the Rep.SetProperty values.

Any thoughts on this?

Thank you,

Ray


'LANGUAGE=ENU
'SERVERNAME=XXXX.XXXX.com
Public Sub Main()

'## cvs_cmd_begin
'## ID = 2001
'## Description = "Report: Historical: CMS custom: ACC AGENT REPORT: Print"
'## Parameters.Add "Report: Historical: CMS custom: ACC AGENT REPORT: Print","_Desc"
'## Parameters.Add "Reports","_Catalog"
'## Parameters.Add "5","_Action"
'## Parameters.Add "1","_Quit"
'## Parameters.Add "Historical\CMS custom\ACC AGENT REPORT","_Report"
'## Parameters.Add "1","_ACD"
'## Parameters.Add "4785","_Top"
'## Parameters.Add "780","_Left"
'## Parameters.Add "18465","_Width"
'## Parameters.Add "6885","_Height"
'## Parameters.Add "The report Historical\CMS custom\ACC AGENT REPORT was not found on ACD 1.","_ReportNotFound"
'## Parameters.Add "*","_BeginProperties"
'## Parameters.Add "8061","Agent"
'## Parameters.Add "05/01/04-05/31/04","Dates"
'## Parameters.Add "*","_EndProperties"
'## Parameters.Add "*","_BeginViews"
'## Parameters.Add "*","_EndViews"

On Error Resume Next

cvsSrv.Reports.ACD = 1
Set Info = cvsSrv.Reports.Reports("Historical\CMS custom\ACC AGENT REPORT")

If Info Is Nothing Then
If cvsSrv.Interactive Then
MsgBox "The report Historical\CMS custom\ACC AGENT REPORT was not found on ACD 1.", vbCritical Or vbOKOnly, "CentreVu Supervisor"
Else
Set Log = CreateObject("CVSERR.cvsLog")
Log.AutoLogWrite "The report Historical\CMS custom\ACC AGENT REPORT was not found on ACD 1."
Set Log = Nothing
End If
Else

b = cvsSrv.Reports.CreateReport(Info,Rep)
If b Then

Rep.Window.Top = 4785
Rep.Window.Left = 780
Rep.Window.Width = 18465
Rep.Window.Height = 6885



Rep.SetProperty "Agent","8061"

Rep.SetProperty "Dates","05/01/04-05/31/04"




b = Rep.PrintReport





Rep.Quit



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

End If
Set Info = Nothing
'## cvs_cmd_end

End Sub
rcotten is offline   Reply With Quote
Old June 9th, 2004, 01:41 PM   #2 (permalink)
rcotten
 
Join Date: Feb 2004
Posts: 12
rcotten is on a distinguished road
Re: CMS Supervisor auto scripts

Well I'll reply to my own thread so if anyone else comes looking for this info they will have it.

CMS Supervisor uses VBSCRIPT in its .csvauto files.

Here is the script I wrote that will read in a text file line for line and run a CMS report for each agent id. This report points to a Custom CMS report but you can adapt it to point to any others.


'Ray Cotten 6/9/04
'VBSCRIPT to run CMS reports for Accucheck
'Reads 1st line of agents.txt to get date range for report
'Reads the rest of agents.txt into v array
'Run CMS Supervisor report ACC AGENT REPORT for each agent id
'Last line of agents.txt should be 9999 to exit program
'agents.txt should be located in the same directory at this *.cvsauto file
'Use cvs.log in the centervu directory to troubleshoot issues
'
'syntax of agents.txt file should be first line date range all other
'lines agent id's. Last line must equal 9999.
'
'05/01/04-05/31/04
'5359
'5023
'5378
'8055
'9999
'


'Environment variables need to run CMS reports
'LANGUAGE=ENU
'SERVERNAME=YOURCMSSERVER.COM


Public Sub Main()

l=0 'loop value for read loop
i=0 'loop value for printing loop

dim date 'value for date range
dim v(999) 'define array. All data is read into this from agents.txt
dim fs, f 'define filesystem stuff for read

cvsSrv.Reports.ACD = 1

Set Info = cvsSrv.Reports.Reports("Historical\CMS custom\ACC AGENT REPORT")

'Reads file one line at a time into v array

Set fs=CreateObject("Scripting.FileSystemObject")
Set f=fs.OpenTextFile("agents.txt", 1)
date = f.ReadLine
Do While f.AtEndOfStream <> True
v(l) = f.ReadLine
l=l+1
Loop 'keep reading in data until EOF hit.

f.Close 'close agents.txt file

Set f=Nothing 'clear f and fs
Set fs=Nothing

'Print report via CMS Supervisor

Do while v(i) < 9999 'run until last line of agents.txt is 9999
b = cvsSrv.Reports.CreateReport(Info,Rep)


Rep.Window.Top = 4785
Rep.Window.Left = 780
Rep.Window.Width = 18465
Rep.Window.Height = 6885

Rep.SetProperty "Agent",v(i) 'defines agent id to run on

Rep.SetProperty "Dates",date 'defines the date range

b = Rep.PrintReport

Rep.Quit

i=i+1 'add one to count i so we get the next agent id

loop 'keep printing CMS reports


end Sub



Enjoy, :devil:

Ray
rcotten is offline   Reply With Quote
Advertisement
 
Advertisement
Sponsored links

Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
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 On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
CMS Terminal Emulator heidz5_7 Definity Servers 1 July 28th, 2006 10:42 AM
Translation updating of CMS occurring; please try later aztech Definity Servers 2 July 12th, 2005 11:36 AM
CMS R13 SSH trouble mmilobedzki Definity Servers 1 July 6th, 2005 04:47 AM
CMS Automatic Scripts mke Definity Servers 2 November 30th, 2004 06:08 PM
Copying CMS Custom Reports to another server nexSIP Definity Servers 0 June 26th, 2003 10:21 PM


All times are GMT -6. The time now is 10:09 AM.


Powered by vBulletin® Version 3.7.2
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.0.0 RC6
Copyright ©2002 - 2007, PBXtech LLCAd Management by RedTyger

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36