Colinjr017
IS-IT--Management
Hi
Does anyone know how to do this please. I am running CMS Supervisor Client R16 and an acsauto script for a real time report. I can get my output filename to include the date but not the time. The Function FormatDateTime only seems to work when a value of 1 is used, which gives me a valid filename with date, but I want time in there. When I use a value of 3 (or any of the other values 0, 2,3 or 4) it does not work. The key line seems to be the 'b =' towards the bottom.
Below is a copy of my script contents:
'LANGUAGE=ENU
'SERVERNAME=10.45.1.200
Public Sub Main()
'## cvs_cmd_begin
'## ID = 2001
'## Description = "Report: Real-Time: Designer: 1. crTrunk Group Real Time Capacity V3: Export Data"
'## Parameters.Add "Report: Real-Time: Designer: 1. crTrunk Group Real Time Capacity V3: Export Data","_Desc"
'## Parameters.Add "Reports","_Catalog"
'## Parameters.Add "2","_Action"
'## Parameters.Add "1","_Quit"
'## Parameters.Add "Real-Time\Designer\1. crTrunk Group Real Time Capacity V3","_Report"
'## Parameters.Add "2","_ACD"
'## Parameters.Add "720","_Top"
'## Parameters.Add "7875","_Left"
'## Parameters.Add "5565","_Width"
'## Parameters.Add "11715","_Height"
'## Parameters.Add "default","_TimeZone"
'## Parameters.Add "The report Real-Time\Designer\1 crTrunk Group Real Time Capacity was not found on ACD 2.","_ReportNotFound"
'## Parameters.Add "*","_BeginProperties"
'## Parameters.Add "101-158","Trunk Group"
'## Parameters.Add "*","_EndProperties"
'## Parameters.Add "*","_BeginViews"
'## Parameters.Add "*","_EndViews"
'## Parameters.Add "P:\CMS Scripts\Export Test1.txt","_Output"
'## Parameters.Add "9","_FldSep"
'## Parameters.Add "0","_TextDelim"
'## Parameters.Add "True","_NullToZero"
'## Parameters.Add "True","_Labels"
'## Parameters.Add "True","_DurSecs"
On Error Resume Next
cvsSrv.Reports.ACD = 2
Set Info = cvsSrv.Reports.Reports("Real-Time\Designer\1. crTrunk Group Real Time Capacity V3")
If Info Is Nothing Then
If cvsSrv.Interactive Then
MsgBox "The report Real-Time\Designer\1 crTrunk Group Real Time Capacity was not found on ACD 2.", vbCritical Or vbOKOnly, "Avaya CMS Supervisor"
Else
Set Log = CreateObject("ACSERR.cvsLog")
Log.AutoLogWrite "The report Real-Time\Designer\1 crTrunk Group Real Time Capacity was not found on ACD 2."
Set Log = Nothing
End If
Else
b = cvsSrv.Reports.CreateReport(Info,Rep)
If b Then
Rep.Window.Top = 720
Rep.Window.Left = 7875
Rep.Window.Width = 5565
Rep.Window.Height = 11715
Rep.TimeZone = "default"
Rep.SetProperty "Trunk Group","101-158"
b = Rep.ExportData("P:\CMS Scripts\Export Test1 "&FormatDateTime(date(), 1)&".xls", 9, 0, True, True, True)
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
If anyone can help, it would be really appreciated !!
Colin
Does anyone know how to do this please. I am running CMS Supervisor Client R16 and an acsauto script for a real time report. I can get my output filename to include the date but not the time. The Function FormatDateTime only seems to work when a value of 1 is used, which gives me a valid filename with date, but I want time in there. When I use a value of 3 (or any of the other values 0, 2,3 or 4) it does not work. The key line seems to be the 'b =' towards the bottom.
Below is a copy of my script contents:
'LANGUAGE=ENU
'SERVERNAME=10.45.1.200
Public Sub Main()
'## cvs_cmd_begin
'## ID = 2001
'## Description = "Report: Real-Time: Designer: 1. crTrunk Group Real Time Capacity V3: Export Data"
'## Parameters.Add "Report: Real-Time: Designer: 1. crTrunk Group Real Time Capacity V3: Export Data","_Desc"
'## Parameters.Add "Reports","_Catalog"
'## Parameters.Add "2","_Action"
'## Parameters.Add "1","_Quit"
'## Parameters.Add "Real-Time\Designer\1. crTrunk Group Real Time Capacity V3","_Report"
'## Parameters.Add "2","_ACD"
'## Parameters.Add "720","_Top"
'## Parameters.Add "7875","_Left"
'## Parameters.Add "5565","_Width"
'## Parameters.Add "11715","_Height"
'## Parameters.Add "default","_TimeZone"
'## Parameters.Add "The report Real-Time\Designer\1 crTrunk Group Real Time Capacity was not found on ACD 2.","_ReportNotFound"
'## Parameters.Add "*","_BeginProperties"
'## Parameters.Add "101-158","Trunk Group"
'## Parameters.Add "*","_EndProperties"
'## Parameters.Add "*","_BeginViews"
'## Parameters.Add "*","_EndViews"
'## Parameters.Add "P:\CMS Scripts\Export Test1.txt","_Output"
'## Parameters.Add "9","_FldSep"
'## Parameters.Add "0","_TextDelim"
'## Parameters.Add "True","_NullToZero"
'## Parameters.Add "True","_Labels"
'## Parameters.Add "True","_DurSecs"
On Error Resume Next
cvsSrv.Reports.ACD = 2
Set Info = cvsSrv.Reports.Reports("Real-Time\Designer\1. crTrunk Group Real Time Capacity V3")
If Info Is Nothing Then
If cvsSrv.Interactive Then
MsgBox "The report Real-Time\Designer\1 crTrunk Group Real Time Capacity was not found on ACD 2.", vbCritical Or vbOKOnly, "Avaya CMS Supervisor"
Else
Set Log = CreateObject("ACSERR.cvsLog")
Log.AutoLogWrite "The report Real-Time\Designer\1 crTrunk Group Real Time Capacity was not found on ACD 2."
Set Log = Nothing
End If
Else
b = cvsSrv.Reports.CreateReport(Info,Rep)
If b Then
Rep.Window.Top = 720
Rep.Window.Left = 7875
Rep.Window.Width = 5565
Rep.Window.Height = 11715
Rep.TimeZone = "default"
Rep.SetProperty "Trunk Group","101-158"
b = Rep.ExportData("P:\CMS Scripts\Export Test1 "&FormatDateTime(date(), 1)&".xls", 9, 0, True, True, True)
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
If anyone can help, it would be really appreciated !!
Colin