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. (Last updated on: June 24, 2019).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Completely disable totals calculations in PivotGrid + performance

Thread ID:

Created:

Updated:

Platform:

Replies:

142814 Feb 20,2019 05:10 PM UTC Feb 25,2019 01:28 PM UTC WPF 3
loading
Tags: PivotGridControl
Carlos Fernando Consigli
Asked On February 20, 2019 05:10 PM UTC

Hi. I'm using pivot grids and I don't need any kind of total or subtotals calculation. I just need to rearrange dimensions, like

From a starting point:

Country   Food   value
USA     Pizza     1000
USA     Donut     200
Canada     Donut     30
Mexico     Pizza     300

move Food to "columns" and see

               Food
Country  Pizza     Donut
USA     1000     200
Canada     blank     30
Mexico     300     blank

I was able to do this using CalculationType =NoCalculation and setting all ShowTotals = false, ShowSubtotals =false and so on.
Still, it is kind of slow when I do that action (about 5 seconds in a high end pc and with just a few data elements), because I guess that although subtotals and totals are not shown, they're still being silently calculated. Is it possible to completely deactivate total and subtotals calculation in order to make the control a little faster?

Also, my datasource will NEVER have more than one value for a given combination of values for the dimensions. In the example above, Country+Food would be a composite primary key. I'm not sure if that precondition could allow me to tune the PivotGrid control in any way to make it faster.

I'm with the WPF version of the control but I could switch to Winforms if you think the that version might be more performant.
Thanks in advance!


Arulraj A [Syncfusion]
Replied On February 21, 2019 12:01 PM UTC

Hi Carlos, 

Thanks for contacting Syncfusion support. 

We have checked your requirement “Display flat data without subtotals in PivotGrid control” in your working version 16.1.0.37. As per the default behavior of PivotGrid, sub-totals for underlying data source will be calculated automatically while populating the values in PivotEngine. Only the subtotals will be ignored from displaying when the grid cells are prepared to render and display. Hence it is necessary to calculate the subtotal to achieve the pivot functionality.  

However we have checked the same in our machine to ensure the performance of our control and we could not see that any performance issue as per your update. We have attached our working sample. Could you please share us your machine configuration where did you get performance issues along with the kind of operation should be performed? 

 
Please get back to us if you need any further assistance on this. 

Regards, 
Arulraj A 


Carlos Fernando Consigli
Replied On February 23, 2019 09:35 PM UTC

Hello Arulraj, thanks a lot for your answer. I run your sample and it still had a laggy behavior. As you told me that sample run ok on your endpoint, I deduced the problem was in my environment, and it was. Although I was running the app in Release mode and with IU Debug disabled, it seems that Visual Studio 2017 still messes up with the executable while it runs. So I just built the solution and executed it from outside Visual Studio and it actually did run with no performance issues. So that is solved.

In the other hand, still in your sample, I'm losing the values when moving the two dimensions to the column section (I attach a video). Maybe that's expected, I'm not sure. Is it possible to make it render the values in that case?

Again, thanks for your help. I have said this before, but Syncfusion support is outstanding.

Attachment: Field_List__23_2_2019_18_29_55_7efff420.zip

Thirupathi Bala Krishnan [Syncfusion]
Replied On February 25, 2019 01:28 PM UTC

Hi Carlos, 

Thanks for the update. 

We have analyzed your requirement – “Data values are not displayed while drag and drop the fields from row to column”. As per default behavior of pivot grid, only the grand total row is displayed while moving the entire rows into columns. In your application, you  had set the ShowGrandTotal property value as false. Since the data values have not displayed. If you need to display the last row data values, you should enable the ShowGrandTotals property value as true in your application. 

Please refer the following code sample: 

#MainWindow.xaml 

<syncfusion:PivotGridControl x:Name="pivotGrid1" Margin="5" ItemSource="{Binding ProductSalesData}" ShowGrandTotals="True" ShowSubTotals="False"
                    >
                <syncfusion:PivotGridControl.PivotRows>
                    <syncfusion:PivotItem FieldMappingName="Country" FieldHeader="Country" TotalHeader="Total"/>
                    <syncfusion:PivotItem FieldMappingName="Food" FieldHeader="Food" TotalHeader="Total"/>
                </syncfusion:PivotGridControl.PivotRows>
                <syncfusion:PivotGridControl.PivotCalculations>
                    <syncfusion:PivotComputationInfo CalculationName = "Total" FieldName = "Amount" SummaryType="DoubleTotalSum"  CalculationType="NoCalculation"/>
                </syncfusion:PivotGridControl.PivotCalculations>
            </syncfusion:PivotGridControl>
 


Please let us know if you need any further assistance. 

Regards, 
Thirupathi B. 
 


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

Live Chat Icon For mobile
Live Chat Icon