Quantcast
Channel: SharePoint 2010 - Development and Programming forum
Viewing all articles
Browse latest Browse all 11571

Calling GetWebAnalyticsReportData results in a strange exception

$
0
0

I am trying to programmatically get to the Web Analytics Report (more specifically, Summary Report) for my site collection. Here is my code:

*******************************************************************

           AnalyticsReportFunction ar = new AnalyticsReportFunction();

            object[,] result = null;
            try
            {
                result = ar.GetWebAnalyticsReportData(SPContext.Current.Site.Url,
                                                    "2",
                                                     ReportType.SummaryReport.ToString(),
                                                        DateTime.Today.AddDays(-30),
                                                        DateTime.Today);
            }
            catch (Exception e)
            {
            }

*******************************************************************************

The problem is that it throws a strange "viewName" exception, and so result remains null. I couldn't find anywhere online what this exception means. The innerexception is null. The stack trace is:

at Microsoft.Office.Server.WebAnalytics.Reporting.ViewParametersManager.GetViewPropertyCount(ReportType reportType)

at Microsoft.Office.Server.WebAnalytics.Reporting.AnalyticsReportFunction.GetWebAnalyticsReportData(String siteUrl, String reportLevel, String reportName, DateTime startDate, DateTime endDate)

Does anyone know what can be the issue?

Thanks a lot!

         Boris

Boris Velikovich


Viewing all articles
Browse latest Browse all 11571

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>