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

PivotTable pagefields filter value


 i am using syncfusion xlsio for reporting. i want to set default value in pivot table pagefilter in excel sheet

i tried lot of codes but not reflected in excel.


 //'Create Pivot Filter object to apply filter to page Fields
                        IPivotFilter filterValue = pivotTable.PageFields["CURRENCY"].PivotFilters.Add();
                        //Page Field would be filtered with value 'Binder'
                        filterValue.Value1 = mCurrency;

                        pivotTable.Fields["CURRENCY"].Items[0].Visible = true;
    IPivotField PageFieldPT = oSheet.PivotTables[ptblCount].PageFields[1];
    PageFieldPT.FilterValue = sDefaultPartnershipType;
   PageFieldPT.PivotFilters.Add(PivotFilterType.ValueEqual, PageFieldPT, sDefaultPartnershipType,null);

Vasanth R

1 Reply

AV Abirami Varadharajan Syncfusion Team February 14, 2017 11:29 AM UTC

Hi Vasanth, 
We are unable to reproduce the issue. We have prepared the sample as per your requirement and the sample can be downloaded from the following location. 
If your requirement is not met, then kindly modify and share us the issue reproducing sample. This will be helpful for us to provide prompt solution at the earliest. 

Live Chat Icon For mobile
Up arrow icon