public final class PivotTableFilter extends Object
PivotTable
filter settings and provides filter functionality.Modifier and Type | Method and Description |
---|---|
PivotTableFilter |
byCustom(PivotField field,
FilterOperator operator,
Object value)
Sets a
CustomFilter to a pivot field. |
PivotTableFilter |
byCustom(PivotField field,
FilterOperator operator,
Object value,
boolean and,
FilterOperator operator2,
Object value2)
Sets a
CustomFilter to a pivot field. |
PivotTableFilter |
byCustom(PivotField field,
PivotField measureField,
FilterOperator operator,
Object value)
Sets a
CustomFilter to a pivot field. |
PivotTableFilter |
byCustom(PivotField field,
PivotField measureField,
FilterOperator operator,
Object value,
boolean and,
FilterOperator operator2,
Object value2)
Sets a
CustomFilter to a pivot field. |
PivotTableFilter |
byDynamic(PivotField field,
DynamicFilterType dynamicFilterType)
Sets a
DynamicFilterType to a pivot field. |
PivotTableFilter |
byDynamic(PivotField field,
PivotField measureField,
DynamicFilterType dynamicFilterType)
Sets a
DynamicFilterType to a pivot field. |
PivotTableFilter |
byTop10(PivotField field,
boolean top,
boolean percent,
double value)
Sets a
Top10Filter to a pivot field. |
PivotTableFilter |
byTop10(PivotField field,
PivotField measureField,
boolean top,
boolean percent,
double value)
Sets a
Top10Filter to a pivot field. |
PivotFilterCollection |
getPivotFilters()
Gets the filter fields.
|
PivotTable |
getPivotTable()
Gets the
PivotTable to filter. |
public PivotTableFilter byCustom(PivotField field, FilterOperator operator, Object value)
Sets a CustomFilter
to a pivot field.
CustomFilter
filters by a one or two conditions (operators and values).
If PivotFilter
already specifies a filter (PivotFilter.getFilter()
is not equal to null
), it will be overridden.
field
- The pivot field that a set Top10Filter
applies to.operator
- The operator used by the filter condition.value
- The value used by the filter condition.PivotTableFilter
to specify additional filters or to apply filter.UnsupportedOperationException
- Value's type is not supported.public PivotTableFilter byCustom(PivotField field, FilterOperator operator, Object value, boolean and, FilterOperator operator2, Object value2)
Sets a CustomFilter
to a pivot field.
CustomFilter
filters by a one or two conditions (operators and values).
If PivotFilter
already specifies a filter (PivotFilter.getFilter()
is not equal to null
), it will be overridden.
field
- The pivot field that a set CustomFilter
applies to.operator
- The operator used by the (first) filter condition.value
- The value used by the (first) filter condition.and
- The value indicating whether the two conditions have an "and" relationship. true
indicates "and" and false
indicates "or".operator2
- The operator used by the second filter condition.value2
- The value used by the second filter condition.PivotTableFilter
to specify additional filters or to apply filter.UnsupportedOperationException
- Value's type is not supported.public PivotTableFilter byCustom(PivotField field, PivotField measureField, FilterOperator operator, Object value)
Sets a CustomFilter
to a pivot field.
CustomFilter
filters by a one or two conditions (operators and values).
If PivotFilter
already specifies a filter (PivotFilter.getFilter()
is not equal to null
), it will be overridden.
field
- The pivot field that a set Top10Filter
applies to.measureField
- The pivot field containing summary values being filtered.operator
- The operator used by the filter condition.value
- The value used by the filter condition.PivotTableFilter
to specify additional filters or to apply filter.UnsupportedOperationException
- Value's type is not supported.public PivotTableFilter byCustom(PivotField field, PivotField measureField, FilterOperator operator, Object value, boolean and, FilterOperator operator2, Object value2)
Sets a CustomFilter
to a pivot field.
CustomFilter
filters by a one or two conditions (operators and values).
If PivotFilter
already specifies a filter (PivotFilter.getFilter()
is not equal to null
), it will be overridden.
field
- The pivot field that a set CustomFilter
applies to.measureField
- The pivot field containing summary values being filtered.operator
- The operator used by the (first) filter condition.value
- The value used by the (first) filter condition.and
- The value indicating whether the two conditions have an "and" relationship. true
indicates "and" and false
indicates "or".operator2
- The operator used by the second filter condition.value2
- The value used by the second filter condition.PivotTableFilter
to specify additional filters or to apply filter.UnsupportedOperationException
- Value's type is not supported.public PivotTableFilter byDynamic(PivotField field, DynamicFilterType dynamicFilterType)
Sets a DynamicFilterType
to a pivot field.
DynamicFilterType
filters by a dynamic criteria that can change, either with the data itself (e.g., "above average") or with the current system date (e.g., show values for "today").
If PivotFilter
already specifies a filter (PivotFilter.getFilter()
is not equal to null
), it will be overridden.
field
- The pivot field that a set DynamicFilterType
applies to.dynamicFilterType
- The dynamic filter type.PivotTableFilter
to specify additional filters or to apply filter.public PivotTableFilter byDynamic(PivotField field, PivotField measureField, DynamicFilterType dynamicFilterType)
Sets a DynamicFilterType
to a pivot field.
DynamicFilterType
filters by a dynamic criteria that can change, either with the data itself (e.g., "above average") or with the current system date (e.g., show values for "today").
If PivotFilter
already specifies a filter (PivotFilter.getFilter()
is not equal to null
), it will be overridden.
field
- The pivot field that a set DynamicFilterType
applies to.measureField
- The pivot field containing summary values being filtered.dynamicFilterType
- The dynamic filter type.PivotTableFilter
to specify additional filters or to apply filter.public PivotTableFilter byTop10(PivotField field, boolean top, boolean percent, double value)
Sets a Top10Filter
to a pivot field.
Top10Filter
filters by a top N (percent or number of items).
If PivotFilter
already specifies a filter (PivotFilter.getFilter()
is not equal to null
), it will be overridden.
field
- The pivot field that a set Top10Filter
applies to.top
- a value indicating whether or not to filter by top order. A false
value filters by bottom order.percent
- A value indicating whether or not to filter by percent value of the pivot field. A false
value filters by number of items.value
- The top or bottom value to use as the filter criteria. For example "Filter by Top 10 Percent" or "Filter by Top 5 Items".PivotTableFilter
to specify additional filters or to apply filter.IndexOutOfBoundsException
- value
must be greater than zero.public PivotTableFilter byTop10(PivotField field, PivotField measureField, boolean top, boolean percent, double value)
Sets a Top10Filter
to a pivot field.
Top10Filter
filters by a top N (percent or number of items).
If PivotFilter
already specifies a filter (PivotFilter.getFilter()
is not equal to null
), it will be overridden.
field
- The pivot field that a set Top10Filter
applies to.measureField
- The pivot field containing summary values being filtered.top
- a value indicating whether or not to filter by top order. A false
value filters by bottom order.percent
- A value indicating whether or not to filter by percent value of the pivot field. A false
value filters by number of items.value
- The top or bottom value to use as the filter criteria. For example "Filter by Top 10 Percent" or "Filter by Top 5 Items".PivotTableFilter
to specify additional filters or to apply filter.IndexOutOfBoundsException
- value
must be greater than zero.public PivotFilterCollection getPivotFilters()
public PivotTable getPivotTable()
PivotTable
to filter.PivotTable
to filter.© GemBox d.o.o. — All rights reserved.