Welcome to the fracta.net forum!

Share your coding ideas or ask questions.

Question VBA automating CMS Supervisor R17

  • tachfine
  • Topic Author
  • Visitor
  • Visitor
7 years 8 months ago #631 by tachfine
Replied by tachfine on topic VBA automating CMS Supervisor R17
Here's the code generated, i'm from morocco, far far away from australia :P

'LANGUAGE=FRA
'SERVERNAME=172.17.42.244
Public Sub Main()

'## cvs_cmd_begin
'## ID = 2001
'## Description = "Rapport: Historique: Concepteur: FGR_seuil_per_interval_per_split_Renault: Imprimer"
'## Parameters.Add "Rapport: Historique: Concepteur: FGR_seuil_per_interval_per_split_Renault: Imprimer","_Desc"
'## Parameters.Add "Reports","_Catalog"
'## Parameters.Add "5","_Action"
'## Parameters.Add "1","_Quit"
'## Parameters.Add "Historical\Designer\FGR_seuil_per_interval_per_split_Renault","_Report"
'## Parameters.Add "1","_ACD"
'## Parameters.Add "1050","_Top"
'## Parameters.Add "3465","_Left"
'## Parameters.Add "14835","_Width"
'## Parameters.Add "11985","_Height"
'## Parameters.Add "default","_TimeZone"
'## Parameters.Add "Le rapport Historical\Designer\FGR_seuil_per_interval_per_split_Renault n'a pas été trouvé sur ACD 1.","_ReportNotFound"
'## Parameters.Add "*","_BeginProperties"
'## Parameters.Add "847","Groupes/Compétences"
'## Parameters.Add "09/08/2016","Dates"
'## Parameters.Add "00:00-23:45","Heures"
'## Parameters.Add "*","_EndProperties"
'## Parameters.Add "*","_BeginViews"
'## Parameters.Add "*","_EndViews"

On Error Resume Next

cvsSrv.Reports.ACD = 1
Set Info = cvsSrv.Reports.Reports("Historical\Designer\FGR_seuil_per_interval_per_split_Renault")

If Info Is Nothing Then
If cvsSrv.Interactive Then
MsgBox "Le rapport Historical\Designer\FGR_seuil_per_interval_per_split_Renault n'a pas été trouvé sur ACD 1.", vbCritical Or vbOKOnly, "Avaya CMS Supervisor"
Else
Set Log = CreateObject("ACSERR.cvsLog")
Log.AutoLogWrite "Le rapport Historical\Designer\FGR_seuil_per_interval_per_split_Renault n'a pas été trouvé sur ACD 1."
Set Log = Nothing
End If
Else

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

Rep.Window.Top = 1050
Rep.Window.Left = 3465
Rep.Window.Width = 14835
Rep.Window.Height = 11985


Rep.TimeZone = "default"



Rep.SetProperty "Groupes/Compétences","847"

Rep.SetProperty "Dates","09/08/2016"

Rep.SetProperty "Heures","00:00-23:45"




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

Please Log in or Create an account to join the conversation.

More
7 years 8 months ago #632 by roller
It's in French that's your problem. Replace

Debug.Print Rep.SetProperty("Group", Group)
Debug.Print Rep.SetProperty("Dates", mydate)
Debug.Print Rep.SetProperty("Times", etc...

With

Rep.SetProperty "Groupes/Compétences", group
Rep.SetProperty "Dates",mydate
Rep.SetProperty "Heures","00:00-23:45"

Have a look at the rest of the code for any other differences but the above could solve it.

Please Log in or Create an account to join the conversation.

  • tachfine
  • Topic Author
  • Visitor
  • Visitor
7 years 8 months ago #633 by tachfine
Replied by tachfine on topic VBA automating CMS Supervisor R17
it didn't work :/

i only have this message on excel:
Historical\Designer\FGR_seuil_per_interval_per_split_Renault

I checked my code, in the CMS EXE i have "Arvato" not 1

here's my code, sorry i'm not that good when it's about connections and servers :/


Public Sub CMSConn()
Dim cvsApp As Object
Dim cvsConn As Object
Dim cvsSrv As Object
Dim Rep As Object
Dim Info As Object, Log As Object, b As Object

Set cvsApp = CreateObject("ACSUP.cvsApplication")
Set cvsConn = CreateObject("ACSCN.cvsConnection")
Set cvsSrv = CreateObject("ACSUPSRV.cvsServer")
Set Rep = CreateObject("ACSREP.cvsReport")
serverAddress = "172.17.42.244"
mydate = "08/08/2016"
UserName = "CETELEMA"
passW = "CETELEMA"
Group = 487
If cvsApp.CreateServer(UserName, "", "", serverAddress, False, "ENU", cvsSrv, cvsConn) Then
If cvsConn.login(UserName, passW, serverAddress, "ENU") Then
On Error Resume Next
cvsSrv.Reports.ACD = 1
Set Info = cvsSrv.Reports.Reports("Historical\Designer\FGR_seuil_per_interval_per_split_Renault")
If Info Is Nothing Then
If cvsSrv.Interactive Then
MsgBox "The Report " & "Historical\Designer\FGR_seuil_per_interval_per_split_Renault" & " was not found on ACD 1", vbCritical Or vbOKOnly, "CentreVu Supervisor"
Else
Set Log = CreateObject("ACSERR.cvslog")
Log.AutoLogWrite "The Report " & "Historical\Designer\FGR_seuil_per_interval_per_split_Renault" & " was not found on ACD 1"
Set Log = Nothing
End If
Else
b = cvsSrv.Reports.CreateReport(Info, Rep)
If b Then
Debug.Print Rep.SetProperty("Groupes/Compétences", Group)
Debug.Print Rep.SetProperty("Dates", mydate)
Debug.Print Rep.SetProperty("Heures", "00:00-23:45")
b = Rep.ExportData("", 9, 0, False, True, True)
Set wk = ThisWorkbook
wk.Sheets(1).Cells.ClearContents
wk.Sheets(1).Cells(1, 1).PasteSpecial

'b = Rep.ExportData(fileP, 9, 0, False, True, True)


Rep.Quit
If Not cvsSrv.Interactive Then cvsSrv.ActiveTasks.Remove Rep.TaskID
Set Rep = Nothing
End If
End If

Set Info = Nothing
End If

End If

cvsConn.logout
cvsConn.Disconnect
cvsSrv.Connected = False
Set Log = Nothing
Set Rep = Nothing
Set cvsSrv = Nothing
Set cvsConn = Nothing
Set cvsApp = Nothing



End Sub

Please Log in or Create an account to join the conversation.

  • tachfine
  • Topic Author
  • Visitor
  • Visitor
7 years 8 months ago #634 by tachfine
Replied by tachfine on topic VBA automating CMS Supervisor R17
I make a mistake by writting 487 at the place of 847 in the report group, everything is good now, the only problem is that i don't have paypal, have you a solution so i can donate? :)

Thank you so much

Please Log in or Create an account to join the conversation.

More
7 years 8 months ago #635 by roller
Good glad that it worked. You don't have to donate i only have PayPal unless if you use Bitcoin :)

Please Log in or Create an account to join the conversation.

More
7 years 8 months ago #636 by roller
By the way you don't have to have a PayPal account to use PayPal. PayPal can accept any credit card.

Please Log in or Create an account to join the conversation.

Time to create page: 0.920 seconds
Powered by Kunena Forum