
November 29th, 2004, 12:38 AM
|
|
Contributing User
|
|
Join Date: Oct 2004
Location: Tejas
Posts: 63
Time spent in forums: 6 h 32 m 5 sec
Reputation Power: 4
|
|
|
CheckBox help
I use a script that was made at work to make a printout of reports everynight. The following code pops up a message box to ask for the date and then prints out the information I need via the numbers in the list array
I want a message box to pop up asking for the day and a check box for each "list" in the array
that way I can choose what I want to print.
How can I do this?
Code:
'LANGUAGE=ENU
'SERVERNAME=10.186.76.20
Public Sub Main()
On Error Resume Next
thedate = InputBox("Date for Reports:","Date","")
cvsSrv.Reports.ACD = 1
Set Info = cvsSrv.Reports.Reports("Historical\CMS custom\NonBillable Rpt")
If Info Is Nothing Then
If cvsSrv.Interactive Then
MsgBox "The report Historical\CMS custom\NonBillable Rpt was not found on ACD 1.", vbCritical Or vbOKOnly, "Avaya CMS Supervisor"
Else
Set Log = CreateObject("AVSERR.cvsLog")
Log.AutoLogWrite "The report Historical\CMS custom\NonBillable Rpt was not found on ACD 1."
Set Log = Nothing
End If
Else
b = cvsSrv.Reports.CreateReport(Info,Rep)
If b Then
Rep.Window.Top = 4785
Rep.Window.Left = 5325
Rep.Window.Width = 8595
Rep.Window.Height = 5820
Rep.SetProperty "Skills","500"
Rep.SetProperty "Dates",thedate
Rep.SetProperty "Times","0-23:59"
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
dim list()
redim list(7)
list(0) = "41;47;48;49;51;52"
list(1) = "800;18"
list(2) = "13;24;30;35;36;37;43"
list(3) = "60;61"
list(4) = "60"
list(5) = "61"
list(6) = "2;3;4;6;16;17;19;20"
list(7) = "2;3;4;6;16;17;19;20;13;24;30;35;36;37;43"
For i = 0 to ubound(list)
Set Info = cvsSrv.Reports.Reports("Historical\CMS custom\OCC By Top Skill")
b = cvsSrv.Reports.CreateReport(Info,Rep)
If b Then
Rep.Window.Top = 2872
Rep.Window.Left = 3405
Rep.Window.Width = 8550
Rep.Window.Height = 5775
Rep.SetProperty "Split/Skill",list(i)
Rep.SetProperty "Date(s)",thedate
Rep.SetProperty "Interval(s)","0-23:59"
b = Rep.PrintReport
Rep.Quit
If Not cvsSrv.Interactive Then cvsSrv.ActiveTasks.Remove Rep.TaskID
Set Rep = Nothing
End If
Set Info = Nothing
next
End Sub
|