Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

CMS Scripting to Harddrive? VB Help? 2

Status
Not open for further replies.

lopes1211

Technical User
Jan 11, 2002
2,841
US
Well I have been playing around a bit with scripting and I'm just trying to accomplish what I think would be a simple task. Have a script run to save a report to my harddrive. I have scripting setup, I do have an automatic script saved and it does run but it prints to my PC's default printer. I do not know VB but I do see the word PRINT in the script. Does anyone know what I would replace in this simple script to specify a harddrive location and probably a deliminator?

'LANGUAGE=ENU
'SERVERNAME=10.11.X.XX
Public Sub Main()

'## cvs_cmd_begin
'## ID = 2001
'## Description = "Report: Historical: Trunk/Trunk Group: Trunk Group Summary Interval: Print"
'## Parameters.Add "Report: Historical: Trunk/Trunk Group: Trunk Group Summary Interval: Print","_Desc"
'## Parameters.Add "Reports","_Catalog"
'## Parameters.Add "5","_Action"
'## Parameters.Add "1","_Quit"
'## Parameters.Add "Historical\Trunk/Trunk Group\Trunk Group Summary Interval","_Report"
'## Parameters.Add "1","_ACD"
'## Parameters.Add "-60","_Top"
'## Parameters.Add "-60","_Left"
'## Parameters.Add "17400","_Width"
'## Parameters.Add "12630","_Height"
'## Parameters.Add "The report Historical\Trunk/Trunk Group\Trunk Group Summary Interval was not found on ACD 1.","_ReportNotFound"
'## Parameters.Add "*","_BeginProperties"
'## Parameters.Add "8","Trunk Group Name"
'## Parameters.Add "-5","Date"
'## Parameters.Add "0-22","Times"
'## Parameters.Add "*","_EndProperties"
'## Parameters.Add "*","_BeginViews"
'## Parameters.Add "*","_EndViews"

On Error Resume Next

cvsSrv.Reports.ACD = 1
Set Info = cvsSrv.Reports.Reports("Historical\Trunk/Trunk Group\Trunk Group Summary Interval")

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

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

Rep.Window.Top = -60
Rep.Window.Left = -60
Rep.Window.Width = 17400
Rep.Window.Height = 12630



Rep.SetProperty "Trunk Group Name","8"

Rep.SetProperty "Date","-5"

Rep.SetProperty "Times","0-22"




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

-CL
 
b = Rep.ExportData("c:\export\export01.txt", 59, 0, True, True, False)

parameters are :
- File name with full path (may be txt or csv if you select ; as field separator)
- the ascii decimal value for the separator (9 for "Horizontal tab", 58 for ":", 59 for ";", 44 for ",")
- the string delimiter (0 for nothing, 1 for ", 2 for ')
- replace null values by 0 (True or False)
- include labels and headers (True or False)
- Export hours and Duration in seconds
 
Wow! That does look like a simple fix.

-CL
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top