Hi ! Can anyone help me on how to change the script I got? I need to save the report to the file that I will be created inste ad of printing it directly to my printer. Here is the sample script:
'LANGUAGE=ENU
'SERVERNAME=rivcms2.echostar.com
Public Sub Main()
'## cvs_cmd_begin
'## ID = 2001
'## Description = "Report: Real-Time: Agent: Agent Report: Print"
'## Parameters.Add "Report: Real-Time: Agent: Agent Report: Print","_Desc"
'## Parameters.Add "Reports","_Catalog"
'## Parameters.Add "5","_Action"
'## Parameters.Add "1","_Quit"
'## Parameters.Add "Real-Time\Agent\Agent Report","_Report"
'## Parameters.Add "4","_ACD"
'## Parameters.Add "3810","_Top"
'## Parameters.Add "5145","_Left"
'## Parameters.Add "8865","_Width"
'## Parameters.Add "4845","_Height"
'## Parameters.Add "The report Real-Time\Agent\Agent Report was not found on ACD 4.","_ReportNotFound"
'## Parameters.Add "*","_BeginProperties"
'## Parameters.Add "2","Split/Skill"
'## Parameters.Add "*","_EndProperties"
'## Parameters.Add "*","_BeginViews"
'## Parameters.Add "G4,0,0;0,2,2","data"
'## Parameters.Add "*","_EndViews"
On Error Resume Next
cvsSrv.Reports.ACD = 4
Set Info = cvsSrv.Reports.Reports("Real-Time\Agent\Agent Report"
If Info Is Nothing Then
If cvsSrv.Interactive Then
MsgBox "The report Real-Time\Agent\Agent Report was not found on ACD 4.", vbCritical Or vbOKOnly, "Avaya CMS Supervisor"
Else
Set Log = CreateObject("AVSERR.cvsLog"
Log.AutoLogWrite "The report Real-Time\Agent\Agent Report was not found on ACD 4."
Set Log = Nothing
End If
Else
b = cvsSrv.Reports.CreateReport(Info,Rep)
If b Then
Rep.Window.Top = 3810
Rep.Window.Left = 5145
Rep.Window.Width = 8865
Rep.Window.Height = 4845
Rep.SetProperty "Split/Skill","2"
Rep.ReportView.Add "G4,0,0;0,2,2","data"
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
Thanks.
'LANGUAGE=ENU
'SERVERNAME=rivcms2.echostar.com
Public Sub Main()
'## cvs_cmd_begin
'## ID = 2001
'## Description = "Report: Real-Time: Agent: Agent Report: Print"
'## Parameters.Add "Report: Real-Time: Agent: Agent Report: Print","_Desc"
'## Parameters.Add "Reports","_Catalog"
'## Parameters.Add "5","_Action"
'## Parameters.Add "1","_Quit"
'## Parameters.Add "Real-Time\Agent\Agent Report","_Report"
'## Parameters.Add "4","_ACD"
'## Parameters.Add "3810","_Top"
'## Parameters.Add "5145","_Left"
'## Parameters.Add "8865","_Width"
'## Parameters.Add "4845","_Height"
'## Parameters.Add "The report Real-Time\Agent\Agent Report was not found on ACD 4.","_ReportNotFound"
'## Parameters.Add "*","_BeginProperties"
'## Parameters.Add "2","Split/Skill"
'## Parameters.Add "*","_EndProperties"
'## Parameters.Add "*","_BeginViews"
'## Parameters.Add "G4,0,0;0,2,2","data"
'## Parameters.Add "*","_EndViews"
On Error Resume Next
cvsSrv.Reports.ACD = 4
Set Info = cvsSrv.Reports.Reports("Real-Time\Agent\Agent Report"
If Info Is Nothing Then
If cvsSrv.Interactive Then
MsgBox "The report Real-Time\Agent\Agent Report was not found on ACD 4.", vbCritical Or vbOKOnly, "Avaya CMS Supervisor"
Else
Set Log = CreateObject("AVSERR.cvsLog"
Log.AutoLogWrite "The report Real-Time\Agent\Agent Report was not found on ACD 4."
Set Log = Nothing
End If
Else
b = cvsSrv.Reports.CreateReport(Info,Rep)
If b Then
Rep.Window.Top = 3810
Rep.Window.Left = 5145
Rep.Window.Width = 8865
Rep.Window.Height = 4845
Rep.SetProperty "Split/Skill","2"
Rep.ReportView.Add "G4,0,0;0,2,2","data"
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
Thanks.