This is a migrated thread and some comments may be shown as answers.

Adding one more agggregate field :Object reference not set to an instance of an object

1 Answer 65 Views
PivotGrid
This is a migrated thread and some comments may be shown as answers.
Diyan
Top achievements
Rank 1
Diyan asked on 24 Oct 2014, 12:37 PM
Hi,
I'm using the pivotgrid that is connected to my analytics server. What I do is add 2 row fields one column and 2 aggregate.
 It throws an "Object reference not set to an instance of an object"  every time when I one more aggregate field. It happen with every aggregate field. I saw that in the sql profiler there is no  error and all MDXQueries are executed successfully. Below you can find the stack trace of the exception and hopefully it can give you a clue what is wrong.

  at Telerik.Web.UI.PivotHelperModelManager.BuildRowPivotModel()     
     at Telerik.Web.UI.RadPivotGrid.CreateChildControls(IEnumerable dataSource, Boolean dataBinding)     
     at System.Web.UI.WebControls.CompositeDataBoundControl.PerformDataBinding(IEnumerable data)     
     at System.Web.UI.WebControls.DataBoundControl.OnDataSourceViewSelectCallback(IEnumerable data)     
     at System.Web.UI.DataSourceView.Select(DataSourceSelectArguments arguments, DataSourceViewSelectCallback callback)     
     at System.Web.UI.WebControls.DataBoundControl.PerformSelect()     
     at Telerik.Web.UI.RadPivotGrid.PerformSelect()     
     at System.Web.UI.WebControls.BaseDataBoundControl.DataBind()     
     at Telerik.Web.UI.RadPivotGrid.DataBind()     
     at Telerik.Web.UI.PivotGridFieldReorderEventArgs.ExecuteCommand(Object source)     
     at Telerik.Web.UI.RadPivotGrid.OnBubbleEvent(Object source, EventArgs args)     
     at System.Web.UI.Control.RaiseBubbleEvent(Object source, EventArgs args)     
     at Telerik.Web.UI.PivotGridItem.OnBubbleEvent(Object source, EventArgs args)     
     at Telerik.Web.UI.PivotGridItem.FireCommandEvent(String commandName, Object commandArgument)     
     at Telerik.Web.UI.RadPivotGrid.HandleFireCommand(String commandName, String commandArgument)     
     at Telerik.Web.UI.RadPivotGrid.RaisePostBackEvent(String eventArgument)     
     at System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument)     
     at System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData)     
     at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)

Best Regards,
Diyan Penkov

1 Answer, 1 is accepted

Sort by
0
Viktor Tachev
Telerik team
answered on 29 Oct 2014, 08:38 AM
Hello Diyan,

Based on the provided description it would be hard to pinpoint the exact cause of the issue. Nevertheless, please ensure that when adding aggregate fields you are using an approach similar to the one illustrated in the following demo:

In case the issue persists, would you share your full markup with the relevant code-behind so we could try to replicate the problem locally and look for its cause?

Regards,
Viktor Tachev
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
Tags
PivotGrid
Asked by
Diyan
Top achievements
Rank 1
Answers by
Viktor Tachev
Telerik team
Share this question
or