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 wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Apending to a csv file in CentreVu

Status
Not open for further replies.

Asspin

Technical User
Jan 17, 2005
155
US
Ok, so I have this report that I can generate a csv file with the info I need in it, now I need to run the same report for several other split skills and append to the csv file. Anyone have any idea how to do this?

Here is my current code, it is an auto script with a popup for the date I want.

Code:
Public Sub Main()

'## cvs_cmd_begin
'## ID = 2001
'## Description = "Report: Historical: Designer: Summry/Interval/Multi-Day/Multi-Split: Export Data"
'## Parameters.Add "Report: Historical: Designer: Summry/Interval/Multi-Day/Multi-Split: Export Data","_Desc"
'## Parameters.Add "Reports","_Catalog"
'## Parameters.Add "2","_Action"
'## Parameters.Add "1","_Quit"
'## Parameters.Add "Historical\Designer\Summry/Interval/Multi-Day/Multi-Split","_Report"
'## Parameters.Add "1","_ACD"
'## Parameters.Add "1965","_Top"
'## Parameters.Add "3360","_Left"
'## Parameters.Add "12510","_Width"
'## Parameters.Add "11460","_Height"
'## Parameters.Add "The report Historical\Designer\Summry/Interval/Multi-Day/Multi-Split was not found on ACD 1.","_ReportNotFound"
'## Parameters.Add "*","_BeginProperties"
'## Parameters.Add "273","Split/Skills"
'## Parameters.Add strDate,"Dates"
'## Parameters.Add "00:00-23:00","Times"
'## Parameters.Add "*","_EndProperties"
'## Parameters.Add "*","_BeginViews"
'## Parameters.Add "G-10,0,0;0,2,0","c_0"
'## Parameters.Add "*","_EndViews"
'## Parameters.Add strFile,"_Output"
'## Parameters.Add "44","_FldSep"
'## Parameters.Add "0","_TextDelim"
'## Parameters.Add "True","_NullToZero"
'## Parameters.Add "False","_Labels"
'## Parameters.Add "False","_DurSecs"

   On Error Resume Next

Dim strDate, strFile
set objShell = createobject("Wscript.Shell")
strDate = InputBox("Please enter a day to collect reports. (MM/DD/YYYY)", "Enter Date", Date - 1)
If LenB(strDate) = 0 Then Exit Sub
strFile = objShell.SpecialFolders("Desktop") & "\" & Year(strDate) & "-" & Month(strDate) & "-" & Day(strDate) & "-Report.csv"

   cvsSrv.Reports.ACD = 1
   Set Info = cvsSrv.Reports.Reports("Historical\Designer\Summry/Interval/Multi-Day/Multi-Split")

   If Info Is Nothing Then
	  If cvsSrv.Interactive Then
		  MsgBox "The report Historical\Designer\Summry/Interval/Multi-Day/Multi-Split was not found on ACD 1.", vbCritical Or vbOKOnly, "Avaya CMS Supervisor"
	  Else
	   	  Set Log = CreateObject("AVSERR.cvsLog") 
		  Log.AutoLogWrite "The report Historical\Designer\Summry/Interval/Multi-Day/Multi-Split was not found on ACD 1."
		  Set Log = Nothing
	  End If
   Else

	   b = cvsSrv.Reports.CreateReport(Info,Rep)
	   If b Then
	
	      Rep.Window.Top = 1965
	      Rep.Window.Left = 3360
	      Rep.Window.Width = 12510
	      Rep.Window.Height = 11460        
	

	
	      Rep.SetProperty "Split/Skills","273"
	
	      Rep.SetProperty "Dates",strDate
	
	      Rep.SetProperty "Times","00:00-23:00"
	
	
	      Rep.ReportView.Add "G-10,0,0;0,2,0","c_0"
	
	

	      b = Rep.ExportData(strFile, 44, 0, True, False, False)

	

	

	      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

MsgBox "Report complete."

End Sub

Dan
 
Actually it would be even better if I could script this to pull specific fields into variables. I am quite new to CentreVu scripting, so I am not sure how to do this.

Any help would be appreciated!

Dan
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top