Web Analytics - Daily Page Views Problem

Hermann Löh asked on May 12, 2015 08:36

When calling in Web Analytics the Page Views Analysis, the graph for daily page views gives an error and does not appear. The event log shows the error:

Must declare the scalar variable "@ToDaySecond".

Stack Trace: at CMS.DataEngine.AbstractDataConnection.HandleError(String queryText, SqlException ex) at CMS.DataProviderSQL.DataConnection.ExecuteQuery(String queryText, QueryDataParameters queryParams, QueryTypeEnum queryType, Boolean requiresTransaction) at CMS.SettingsProvider.SqlHelperClass.ExecuteQuery(QueryParameters query) at CMS.Reporting.AbstractReportControl.LoadData() at CMSModules_Reporting_Controls_ReportGraph.GetReportGraph(ReportGraphInfo reportGraph)

Must declare the scalar variable "@FromDayFirst". Must declare the scalar variable "@ToDaySecond".

at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action1 wrapCloseInAction) at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose) at System.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady) at System.Data.SqlClient.SqlDataReader.TryConsumeMetaData() at System.Data.SqlClient.SqlDataReader.get_MetaData() at System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString) at System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async, Int32 timeout, Task& task, Boolean asyncWrite, SqlDataReader ds) at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, TaskCompletionSource1 completion, Int32 timeout, Task& task, Boolean asyncWrite) at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method) at System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior, String method) at System.Data.SqlClient.SqlCommand.ExecuteDbDataReader(CommandBehavior behavior) at System.Data.Common.DbCommand.System.Data.IDbCommand.ExecuteReader(CommandBehavior behavior) at System.Data.Common.DbDataAdapter.FillInternal(DataSet dataset, DataTable[] datatables, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior) at System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior) at System.Data.Common.DbDataAdapter.Fill(DataSet dataSet) at CMS.DataProviderSQL.DataConnection.ExecuteQuery(String queryText, QueryDataParameters queryParams, QueryTypeEnum queryType, Boolean requiresTransaction)

As this is the most used report, it is a pitty that it does not work. Any ideas of how to correct it? We are running Kentico 7.0.103 Ultimate.

Recent Answers


Brenden Kehren answered on May 12, 2015 13:42

I'd take a look in CMSDesk>Tools>Reporting and check for that report in the Web Analytics category and see if it's been modified. If it all of the sudden started doing this, it most likely was modified. If you have versioning enabled you can roll it back. If not, you'll have to manually fix the report.

1 votesVote for this answer Mark as a Correct answer

   Please, sign in to be able to submit a new answer.