It is possible to use real-time reports. The testing I did was a real-time report to create the html export.
You can modify the VBA script to loop the report once it's launched by Windows scheduler:
At the top of the script are a bunch of lines starting with '##
The last line should be:
'## Parameters.Add "False","_UseFonts"
Add this:
Dim PauseTime, Start 'Sets variables for pausing code
PauseTime = 10 ' Set pause duration in seconds
Then before the line:
b = cvsSrv.Reports.CreateReport(Info,Rep)
add this: (change the hour times to what you need)
If hour(now) > 7 then 'If the current hour is 8am or higher then continue
Do While hour(now)< 18 'Run the following until 6pm
Start = Timer
Then after the html export add:
Do While Timer<Start+PauseTime
Loop
Rep.Quit
Then after the section that reads:
If Not cvsSrv.Interactive Then cvsSrv.ActiveTasks.Remove Rep.TaskID
Set Rep = Nothing
End If
Add this:
Loop
End If
Use Windows scheduler to launch the report each morning and let it run. It will stop running at the hour you set in the code.
Here's what my entire script looks like (removed server and user names for securit purposes) to run a real-time report and export to html for skill 503 every 10 seconds:
'LANGUAGE=ENU
'SERVERNAME=*removed for security purposes*
Public Sub Main()
'## cvs_cmd_begin
'## ID = 2001
'## Description = "Report: Real-Time: Split/Skill: Skill Status: Save HTML"
'## Parameters.Add "Report: Real-Time: Split/Skill: Skill Status: Save HTML","_Desc"
'## Parameters.Add "Reports","_Catalog"
'## Parameters.Add "1","_Action"
'## Parameters.Add "0","_Quit"
'## Parameters.Add "Real-Time\Split/Skill\Skill Status","_Report"
'## Parameters.Add "1","_ACD"
'## Parameters.Add "3570","_Top"
'## Parameters.Add "3165","_Left"
'## Parameters.Add "9135","_Width"
'## Parameters.Add "6525","_Height"
'## Parameters.Add "The report Real-Time\Split/Skill\Skill Status was not found on ACD 1.","_ReportNotFound"
'## Parameters.Add "*","_BeginProperties"
'## Parameters.Add "503","Split/Skill"
'## Parameters.Add "*","_EndProperties"
'## Parameters.Add "*","_BeginViews"
'## Parameters.Add "G8,0,0;0,2,2","data2"
'## Parameters.Add "*","_EndViews"
'## Parameters.Add "C:\Documents and Settings\*user name removed*\Desktop\Test2.HTML","_Output"
'## Parameters.Add "","_Template"
'## Parameters.Add "False","_UseFonts"
Dim PauseTime, Start
PauseTime = 10 ' Set duration in seconds
On Error Resume Next
cvsSrv.Reports.ACD = 1
Set Info = cvsSrv.Reports.Reports("Real-Time\Split/Skill\Skill Status")
If Info Is Nothing Then
If cvsSrv.Interactive Then
MsgBox "The report Real-Time\Split/Skill\Skill Status was not found on ACD 1.", vbCritical Or vbOKOnly, "Avaya CMS Supervisor"
Else
Set Log = CreateObject("ACSERR.cvsLog")
Log.AutoLogWrite "The report Real-Time\Split/Skill\Skill Status was not found on ACD 1."
Set Log = Nothing
End If
Else
If hour(now) > 7 then
Do While hour(now)< 18
Start = Timer
b = cvsSrv.Reports.CreateReport(Info,Rep)
If b Then
Rep.Window.Top = 3570
Rep.Window.Left = 3165
Rep.Window.Width = 9135
Rep.Window.Height = 6525
Rep.SetProperty "Split/Skill","503"
Rep.ReportView.Add "G8,0,0;0,2,2","data2"
b = Rep.SaveHTML("C:\Documents and Settings\*user name removed*\Desktop\Test2.HTML", False, "")
Do While Timer<Start+PauseTime
Loop
Rep.Quit
If Not cvsSrv.Interactive Then cvsSrv.ActiveTasks.Remove Rep.TaskID
Set Rep = Nothing
End If
Loop
End If
End If
Set Info = Nothing
'## cvs_cmd_end
End Sub
- Stinney
I love learning and passing on knowledge. "Because knowing is half the battle".... GI JOOOOOE!