--> At CallCenterOps.com we’re dedicated to providing information about operations management to those involved in real-time customer service via call centers.
Learn how to advertise on this site.
CCOps Home  |  Forum Home  |  Jobs Board  |  Library  |  Operations  |  Resources  |  In The News  |  Site Map

Go Back   CallCenterOps Forum > Technology Discussion
FAQ Social Groups Calendar Search Today's Posts Mark Forums Read

Technology Discussion The CallCenterOps Technology Forum focuses on the technologies that make call centers work. (No advertising is accepted - posts will be removed.)

Reply
 
LinkBack (5) Thread Tools Display Modes
  5 links from elsewhere to this Post. Click to view. #1 (permalink)  
Old 05-09-2008, 11:37 PM
Registered User
 
Join Date: May 2008
Posts: 0
Avaya CMS 11 Reports in C#

Just for starters I know that there is an older post related to this topic which I have reviewed thuroughly: using C# to run Avaya CMS reports Most of this thread is dedicated to VBA scripts and the little C# code in it does not show how to actually show a report. I did not want to revive a thread that was this old and felt like it was appropriate to start a new one.

I am trying to pull a report from CMS 11 using C#. I can connect to the server, get a list of reports, create the report, pass in the parameters, and request that the file be outputted in HTML or CVS, but the file never actually outputs. I have included full source code below, minus the using statements.

Code:
        public void ProcessReport()
        {
            //Clear the list box that shows a list of all reports on server
            lbReports.Items.Clear();

            string user = "user";
            string pass = "pass";
            string server = "cmsserver";

            object tempconn = new object();
            object tempserver = new object();

            cvsApplicationClass oApp = new cvsApplicationClass();
            cvsConnection oCon = null;
            cvsServer oSrv = null;
            cvsCatalog oCat = null;


            if (oApp.CreateServer(user, "", "", server, false, "", ref tempserver, ref tempconn))
            {
                oCon = (cvsConnection)tempconn;
                oSrv = (cvsServer)tempserver;

                if (oCon.Login(user, pass, server, "ENU", "", false))
                {
                    //ACD is 4
                    cvsCatalog reports = (cvsCatalog)oSrv.Reports;
                    reports.ACD = 4;

                    #region Create Report Name Index
                    //Create index for looking up report Index value
                    //In VBA examples this was not needed as you could directly lookup in the collection by
                    // the name of the report, in C# it needs the int index
                    Hashtable hash = new Hashtable();
                    int i = 0;
                    //Load the report names into the hash for later lookup and display on the screen just to make sure it's working.
                    foreach (cvsReportInfo r in reports.Reports)
                    {
                        //i is the value we need to lookup the report, we already have the report name.
                        hash.Add(r.Key.ToString(), i);
                        //Print just for the heck of it.
                        lbReports.Items.Add(r.Key.ToString());
                        //Incrmeent i
                        i++;
                    }
                    #endregion

                    //Now that we are logged in and ACD is set lets get the report
                    //the name of the report to load
                    string reportname = @"TheReportsName";
                    //the report object
                    cvsReport report;

                    //temp report so we can pass in object as ref
                    object tempReport = new cvsReportClass();

                    //the index number of the report in the reports collection
                    object reportID = Convert.ToInt32(hash[reportname]);

                    //The info about this report, which we need to create it
                    object reportInfo = (cvsReportInfo)reports.Reports.Item(ref reportID);
                    //Create the report
                    bool reportSuccess = reports.CreateReport(ref reportInfo, ref tempReport);

                    //if report is successful
                    if (reportSuccess)
                    {
                        //if we were able to create the report then set the properties. and get the data
                        report = (cvsReport)tempReport;
                        //The Window info, properties, and Export paramaters are all directly pulled from the Script CMS generated
                        // and then converted to C#
                        report.Window.Top = 7770;
                        report.Window.Left = 5220;
                        report.Window.width = 9810;
                        report.Window.Height = 5010;

                        report.SetProperty("Splits/Skills", "127;32;66;64");
                        //this always returns false, which means no report created but no idea why
                        bool success = report.ExportData(@"c:\cms.txt", 44, 0, true, false, true);
                        //success = report.SaveHTML(@"c:\cms.html", false, "");

                        report.Quit();
                    }
                }
            }

            //Logout, disconnect and release com objects
            oCon.Logout();
            oCon.Disconnect();

            System.Runtime.InteropServices.Marshal.ReleaseComObject(oSrv);
            System.Runtime.InteropServices.Marshal.ReleaseComObject(oCon);
            System.Runtime.InteropServices.Marshal.ReleaseComObject(oApp);
        }
Reply With Quote
  #2 (permalink)  
Old 08-31-2008, 08:00 AM
Registered User
 
Join Date: Aug 2008
Posts: 0
I had a similar problem, admittedly when I first started coding this in VBA, and not C#, and it took me weeks of playing to figure it out (and this may not be true for you, but it was the answer for me as to the same errors you've put in your comments as to why it's not working)

You need to be REALLY careful using .SetProperty, this can really mess up your reports (i.e. it returns False and the rest of the code doesn't appear to do anything on the report). By "REALLY careful", I mean with the property name you enter, this needs to be EXACTLY the same as it is on the settings you can enter when you run the report through CMS Supervisor.
So if "Splits/Skills" is actually listed as "Splits/skills" (lower case S), or "Split/Skills" (singular Split) etc etc, then it won't correspond and won't run!

Hope this answers your query, if not, someone else may have a better answer - but your code looks fine to me!
Reply With Quote
  #3 (permalink)  
Old 10-01-2008, 04:28 PM
Registered User
 
Join Date: Oct 2008
Posts: 0
I created a foreach loop that returned the Properties of the report (as objects) which output each object as a string for me to see. This actually worked perfectly - as what it returned to me (For "SS Group Summary" - which is based on an "Agent group" and "Date") was:

Split/Skill
Date

Note - the difference is you used that property as "Splits/Skills" - so, try it without the extra s on the end of each word. Hope this helps!
Reply With Quote
  #4 (permalink)  
Old 10-01-2008, 04:32 PM
Registered User
 
Join Date: Oct 2008
Posts: 0
Worked for me with:

Split/Skill
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is On
Trackbacks are On
Pingbacks are On
Refbacks are On


LinkBacks (?)
LinkBack to this Thread: http://www.callcenterops.com/forum/technology-discussion/3210-avaya-cms-11-reports-c.html
Posted By For Type Date
Working Excel VBA Code for Exporting CMS Reports - Community for Avaya Users This thread Refback 04-24-2009 03:50 PM
Working Excel VBA Code for Exporting CMS Reports - Community for Avaya Users This thread Refback 04-22-2009 06:19 AM
Working Excel VBA Code for Exporting CMS Reports - Community for Avaya Users This thread Refback 03-19-2009 12:29 PM
Working Excel VBA Code for Exporting CMS Reports - Community for Avaya Users This thread Refback 11-21-2008 07:06 AM
Working Excel VBA Code for Exporting CMS Reports - Community for Avaya Users This thread Refback 11-20-2008 10:46 AM

Similar Threads
Thread Thread Starter Forum Replies Last Post
using C# to run Avaya CMS reports madhombre Technology Discussion 27 05-13-2008 07:01 PM
reports from C# - no reports showing in ACD madhombre Technology Discussion 1 05-13-2008 02:36 PM
Using Excel VBA to run Avaya CMS reports mac_see Technology Discussion 4 04-18-2008 08:06 AM
Sample Inbound Reports RickRude General Discussion 3 01-11-2008 06:19 PM


All times are GMT -4. The time now is 09:42 AM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.3.2