0

I'm trying to create an autoscript with CMS Supervisor that will automatically create the report I need. The issue I'm running in to is trying to automate the saving of the report as a text file.

I found a line from another forum post and tried to include it but now it's giving me the error.

Microsoft VBScript compilation error
[Line: 64] Expected end of statement

I'm no coding or VBscript expert so I'm not sure why this error is happening. How come I'm receiving this error and what can I do to fix it?

'LANGUAGE=ENU
'SERVERNAME=CMS-CCU-V18-Primary
Public Sub Main()

'## cvs_cmd_begin
'## ID = 2001
'## Description = "Report: Historical: Agent: Group AUX Daily: Print"
'## Parameters.Add "Report: Historical: Agent: Group AUX Daily: Print","_Desc"
'## Parameters.Add "Reports","_Catalog"
'## Parameters.Add "5","_Action"
'## Parameters.Add "1","_Quit"
'## Parameters.Add "Historical\Agent\Group AUX Daily","_Report"
'## Parameters.Add "7","_ACD"
'## Parameters.Add "1068","_Top"
'## Parameters.Add "5424","_Left"
'## Parameters.Add "13992","_Width"
'## Parameters.Add "11364","_Height"
'## Parameters.Add "default","_TimeZone"
'## Parameters.Add "The report Historical\Agent\Group AUX Daily was not found on ACD 7.","_ReportNotFound"
'## Parameters.Add "*","_BeginProperties"
'## Parameters.Add "PGHF Fraud","Agent Group"
'## Parameters.Add "-1","Date"
'## Parameters.Add "*","_EndProperties"
'## Parameters.Add "*","_BeginViews"
'## Parameters.Add "G1,0,0;0,2,0","data"
'## Parameters.Add "*","_EndViews"

   On Error Resume Next

   cvsSrv.Reports.ACD = 7
   Set Info = cvsSrv.Reports.Reports("Historical\Agent\Group AUX Daily")

   If Info Is Nothing Then
      If cvsSrv.Interactive Then
          MsgBox "The report Historical\Agent\Group AUX Daily was not found on ACD 7.", vbCritical Or vbOKOnly, "Avaya CMS Supervisor"
      Else
          Set Log = CreateObject("ACSERR.cvsLog") 
          Log.AutoLogWrite "The report Historical\Agent\Group AUX Daily was not found on ACD 7."
          Set Log = Nothing
      End If
   Else

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

          Rep.Window.Top = 1068
          Rep.Window.Left = 5424
          Rep.Window.Width = 13992
          Rep.Window.Height = 11364        


                        Rep.TimeZone = "default"



          Rep.SetProperty "Agent Group","PGHF Fraud"

          Rep.SetProperty "Date","-1"


          Rep.ReportView.Add "G1,0,0;0,2,0","data"



          b = Rep.ExportData("C:\Users\jlmar19\Desktop\GroupAUXDaily "&FormatDateTime(date()-1, 1)&".txt"), 44, 1, 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
MyNameHere
  • 85
  • 2
  • 12

0 Answers0