We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
close icon

error when trying to add PivotComputationInfo to PivotCalculations

I would like to attach a Data table to a pivot grid (in Visual Basic)
At this moment it's working fine with PivotRows and PivotColumns but not with PivotCalculations.
I have the following piece of code:

Dim newPivotComputationInfo As New PivotComputationInfo With {.BaseField = "Item", .FieldName = "Item", .SummaryType = SummaryType.Count, .CalculationName = "Count", .Format = "# ##0"}

PivotGridControl1.PivotCalculations.Add(newPivotComputationInfo )

when I try to add the PivotComputationInfoI have an exception with the following message: unreferenced opbject or something like that.

Please, any advice.


5 Replies

AR Amal Raj U Syncfusion Team February 9, 2016 05:19 PM UTC

Hi Patrick,


Thank you for using Syncfusion products.


Exception you have mentioned is not reproduced at our side.


Do you add repeatedly in pivotcalculations or Please provide us as sample with exception occurring for reference.


Regards,
Amal Raj U



AR Amal Raj U Syncfusion Team February 10, 2016 04:40 AM UTC

Hi Patrick,

We regret for the inconvenience.

We have implemented an sample based on your scenario, we couldn’t reproduce the exception.

Please refer the sample VB-356959335 . If you have any further requirements, Please provide us your sample.

Regards,
Amal Raj U


AR Amal Raj U Syncfusion Team February 10, 2016 12:27 PM UTC

Hi Patrick,

Please ignore our previous updates.

I am afraid that I am unable to reproduce the exception with adding the PivotCalculationInfo into pivot calculations collection (as mentioned, the underlying item source is DataTable). Also I have created a simple sample to test this issue and it is available in the following link.

Sample:  http://www.syncfusion.com/downloads/support/forum/121917/ze/PivotDTVB-397536016

We have tried this in the latest version. Could you please share us the version you are using?

If still the issue exists, could you please try reproducing it in the above sample or send us the reproducing steps with your sample so that we could sort out the cause of the issue and provide you a solution?

Regards,
Amal Raj U


PA Patrick February 10, 2016 04:03 PM UTC

Hi,
 
Thank you very much for your advices and your code.
 
I'm using Visual Studio 2010 and your exemple works perfectly on my computer withsyncfusion release 13.4400 but my code is'nt. .
 
May it's due to the variables name. I will check tomorrow and take you in touch with my investigations.
 
Regards.
 
Patrick


AR Amal Raj U Syncfusion Team February 11, 2016 12:28 PM UTC

Hi Patrick,

Thank you for the update.

Please let us know, If you need any further assistance.

Regards,
Amal Raj U.

Loader.
Live Chat Icon For mobile
Up arrow icon