2.330.3 Filter.Operator

The Filter.Operator element specifies an operator to use to compare the values of Filter.FilterExpression and FilterValues. The Filter.Operator element MUST be specified. The value of this element MUST be a String ([XMLSCHEMA2/2] section 3.2.1) that is one of the following:

Equal: Specifies an equality comparison.

Like: Specifies a like comparison (that is, it compares a string against a pattern).

NotEqual: Specifies an inequality comparison.

GreaterThan: Specifies a comparison to determine whether the Filter.FilterExpression value is greater than the FilterValues values.

GreaterThanOrEqual: Specifies a comparison to determine whether the Filter.FilterExpression value is greater than or equal to the FilterValues values.

LessThan: Specifies a comparison to determine whether the Filter.FilterExpression value is less than the FilterValues values.

LessThanOrEqual: Specifies a comparison to determine whether the Filter.FilterExpression value is less than or equal to the FilterValues values.

TopN: Specifies whether the Filter.FilterExpression value is within the top N data values, where N is specified by FilterValues.FilterValue.

BottomN: Specifies whether the Filter.FilterExpression value is within the bottom N data values, where N is specified by FilterValues.FilterValue.

TopPercent: Specifies whether the Filter.FilterExpression value is within the top N percent of data values, where N is specified by FilterValues.FilterValue.

BottomPercent: Specifies whether the Filter.FilterExpression value is within the bottom N percent of data values, where N is specified by FilterValues.FilterValue.

In: Specifies whether the value of Filter.FilterExpression is equal to any FilterValues.FilterValue instances.

Between: Specifies whether the value of Filter.FilterExpression is between the values of two FilterValues.FilterValue instances.

The TopN, BottomN, TopPercent, and BottomPercent operators SHOULD include ties in the resulting data. String comparisons within filters SHOULD be locale-dependent. The NULL constant is equal to itself.

The TopPercent and BottomPercent operators SHOULD round up and down, respectively, if the percentage that is specified would result in a partial item being included (for example, if the Top 25% of 13 items is four items and the Bottom 75% is nine items). If the value of the Filter.Operator element is "In", multi-value report parameters that have the ReportParameter.MultiValue element specified with a value of true MUST be supported and treated as multiple FilterValue instances.

In the following example, if "Cities" is a multi-value parameter for a Filter that references "Cities" within any FilterValues.FilterValue elements, the following RDL:

 <FilterValues>
    <FilterValue>=Parameters!Cities.Value</FilterValue>
 </FilterValues>

MUST be equivalent to the following RDL:

 <FilterValues>
    <FilterValue>=Parameters!Cities.Value[0]</FilterValue>
    <FilterValue>=Parameters!Cities.Value[1]</FilterValue>
    […]
 </FilterValues>

Following is the parent element of the Filter.Operator element.

Parent elements

Filter

The following is the XML Schema definition of the Filter.Operator element.

 <xsd:element name="Operator">
   <xsd:simpleType>
     <xsd:restriction base="xsd:string">
       <xsd:enumeration value="Equal" />
       <xsd:enumeration value="Like" />
       <xsd:enumeration value="NotEqual" />
       <xsd:enumeration value="GreaterThan" />
       <xsd:enumeration value="GreaterThanOrEqual" />
       <xsd:enumeration value="LessThan" />
       <xsd:enumeration value="LessThanOrEqual" />
       <xsd:enumeration value="TopN" />
       <xsd:enumeration value="BottomN" />
       <xsd:enumeration value="TopPercent" />
       <xsd:enumeration value="BottomPercent" />
       <xsd:enumeration value="In" />
       <xsd:enumeration value="Between" />
     </xsd:restriction>
   </xsd:simpleType>
 </xsd:element>