Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Wanet Telecoms Ltd on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

CMS Supervisor R16 - Script Assistance 1

Status
Not open for further replies.

janaya

IS-IT--Management
May 7, 2002
2,292
US
Have this issue.

Created a script in CMS Supervisor R16 against CMS R.16. This is a Designer Report that the customer would like to run monthly. We have tried to launch this script via Windows Task Scheduler but for whatever reason we cannot get it to run with Task Scheduler or by creating a batch file to run the script.

The customer has stated that they will run the reports monthly, but wants the ability to just launch the script. This will allow anyone in the Call Center to walk over to the machine that has the scripts and just double click the script and launch the report.

When the script was written, it was a monthly report run in November for October stats. Now that December 1 has come and gone, they wanted the ability to just click the script and run the same report, but for the stats to come out for November. Unfortunately, they are coming out for October again.

My first thoughts are the report was run in CMS Supervisor and was told to run for October specifically instead of a monthly report that would run say Month -1. This way it would always take the previous month instead of the specific Month that was chosen when the script was created.

Am I on the right track? Or will it not do this?
 
To clarify, this is the script

'LANGUAGE=ENU
'SERVERNAME=TEST
Public Sub Main()

'## cvs_cmd_begin
'## ID = 2001
'## Description = "Report: Historical: Designer: Monthly State VDN Calls: Export Data"
'## Parameters.Add "Report: Historical: Designer: Monthly State VDN Calls: Export Data","_Desc"
'## Parameters.Add "Reports","_Catalog"
'## Parameters.Add "2","_Action"
'## Parameters.Add "1","_Quit"
'## Parameters.Add "Historical\Designer\Monthly State VDN Calls","_Report"
'## Parameters.Add "1","_ACD"
'## Parameters.Add "-120","_Top"
'## Parameters.Add "-120","_Left"
'## Parameters.Add "24240","_Width"
'## Parameters.Add "13140","_Height"
'## Parameters.Add "The report Historical\Designer\Monthly State VDN Calls was not found on ACD 1.","_ReportNotFound"
'## Parameters.Add "*","_BeginProperties"
'## Parameters.Add "10/1/2011","Dates"
'## Parameters.Add "*","_EndProperties"
'## Parameters.Add "*","_BeginViews"
'## Parameters.Add "*","_EndViews"
'## Parameters.Add "C:\Users\janaya\Desktop\AMERICANWATERVDN.CSV","_Output"
'## Parameters.Add "9","_FldSep"
'## Parameters.Add "0","_TextDelim"
'## Parameters.Add "False","_NullToZero"
'## Parameters.Add "True","_Labels"
'## Parameters.Add "False","_DurSecs"

On Error Resume Next

cvsSrv.Reports.ACD = 1
Set Info = cvsSrv.Reports.Reports("Historical\Designer\Monthly State VDN Calls")

If Info Is Nothing Then
If cvsSrv.Interactive Then
MsgBox "The report Historical\Designer\Monthly State VDN Calls was not found on ACD 1.", vbCritical Or vbOKOnly, "Avaya CMS Supervisor"
Else
Set Log = CreateObject("ACSERR.cvsLog")
Log.AutoLogWrite "The report Historical\Designer\Monthly State VDN Calls was not found on ACD 1."
Set Log = Nothing
End If
Else

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

Rep.Window.Top = -120
Rep.Window.Left = -120
Rep.Window.Width = 24240
Rep.Window.Height = 13140


THIS IS WHAT I WANT TO CHANGE. I JUST WANT IT
TO ALWAYS PICK THE LAST MONTH, INSTEAD OF THIS DATE
Rep.SetProperty "Dates","10/1/2011"




b = Rep.ExportData("C:\Users\janaya\Desktop\AMERICANWATERVDN.CSV", 9, 0, False, True, False)





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
 
Try this:

tdays1=-1*day(date())
tdate1=dateadd("d",tdays1,date())
tdays2=-1*(day(tdate1)-1)
tdate2=dateadd("d",tdays2,tdate1)
LastMonth= cstr(formatdatetime(tdate2))
Rep.SetProperty "Dates",LastMonth
 
Would I just insert this in place of:

Rep.SetProperty "Dates","10/1/2011"

 
I think after looking at this I answered my own question. I post in place of what I have and launch the script.

I am more from a Nortel background with Contact Center. It has been many moons since I had to work on CMS.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top