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 : Nov 16th 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

PivotGrid does not remember SummaryType

Thread ID:

Created:

Updated:

Platform:

Replies:

114234 Nov 7,2013 08:07 AM UTC Oct 5,2017 10:34 AM UTC WPF 3
loading
Tags: PivotGridControl
Stefan
Asked On November 7, 2013 08:07 AM UTC

Hello,
 
I have noticed that the PivotGrid remembers the Format of a field after removing it from PivotCalculations and adding it again. But it does not remember the SummaryType.
 
This is not a big Problem for Double-Fields, because the default SummaryType is DoubleTotalSum. But when we work with financial data we use Decimal-Fields. The default SummaryType for Decimal-Fields is Count. This is a problem when we want to hand out the software to users who are not very familiar with modern userinterfaces.
 
Is there a way to work around this?

Renuka N [Syncfusion]
Replied On November 8, 2013 04:37 PM UTC

Hi Stefan,

Decimal field values rendered correctly with summary type DecimalTotalSum.Please refer the following sample link.

http://www.syncfusion.com/downloads/support/directtrac/general/CustomSummariesDemo580833926.zip

Regards,

Renuka N.


chaitanya
Replied On October 4, 2017 03:39 PM UTC

Hi,

The requested file doesn't exist. Can you please upload it again.?


Sabaridass Ramamoorthy [Syncfusion]
Replied On October 5, 2017 10:34 AM UTC

Hi Chaitanya, 

Sorry for the inconvenience caused. 

You can find the sample from the following location which is created to render the decimal values with using the SummaryType as “DecimalTotalSum”

Please refer to the following code example. 
#Window1.Xaml.cs 
 
public Window1() 
        { 
            InitializeComponent(); 
 
            // Adding pivot rows 
            Pivot.PivotRows.Add(new Syncfusion.PivotAnalysis.Base.PivotItem() { FieldMappingName = "Category", FieldHeader = "Category", TotalHeader = "Total" }); 
            Pivot.PivotRows.Add(new Syncfusion.PivotAnalysis.Base.PivotItem() { FieldMappingName = "Item", FieldHeader = "Item", TotalHeader = "Total" }); 
 
            //Adding pivot columns 
            Pivot.PivotColumns.Add(new Syncfusion.PivotAnalysis.Base.PivotItem() { FieldMappingName = "Country", FieldHeader = "Country", TotalHeader = "Total" }); 
            Pivot.PivotColumns.Add(new Syncfusion.PivotAnalysis.Base.PivotItem() { FieldMappingName = "State", FieldHeader = "State", TotalHeader = "Total" }); 
 
            //Adding pivot calculations 
            Pivot.PivotCalculations.Add(new Syncfusion.PivotAnalysis.Base.PivotComputationInfo() { FieldName = "Currency", FieldHeader = "Currency", Format = "C", SummaryType = Syncfusion.PivotAnalysis.Base.SummaryType.DecimalTotalSum }); 
            Pivot.PivotCalculations.Add(new Syncfusion.PivotAnalysis.Base.PivotComputationInfo() { FieldName = "ID", FieldHeader = "ID", Format = "#.##", SummaryType = Syncfusion.PivotAnalysis.Base.SummaryType.IntTotalSum }); 
        } 

Regards, 
Sabaridass R. 
 


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.

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

;