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

PivotGrid does not remember SummaryType

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?

3 Replies

RN Renuka N Syncfusion Team 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.



CH chaitanya October 4, 2017 03:39 PM UTC

Hi,

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



SR Sabaridass Ramamoorthy Syncfusion Team 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. 
 


Loader.
Live Chat Icon For mobile
Up arrow icon