Class FilterConditions

FilterConditions provides a collection of FilterCondition objects, which describe the filter conditions (exclusion conditions in the case of the ExcludeConditions property) for a particular report.

System.Object
  System.Collections.ObjectModel.Collection<IFilterCondition>
    System.Collections.ObjectModel.ObservableCollection<IFilterCondition>
      Stonefield.Collections.SimpleObservableCollection<IFilterCondition>
        Stonefield.Collections.BaseObservableCollection<IFilterCondition>
          Stonefield.Query.Filtering.FilterConditions
public class FilterConditions : BaseObservableCollection<IFilterCondition>, IFilterConditions

Class Members

MemberDescription

Constructor

The constructor.

Clone

Clones the filter collection.

public sealed IFilterConditions Clone()

GetConditionByField

Finds a condition in the collection by the field name.

public sealed IFilterCondition GetConditionByField(string fieldName)

GetDescription

Returns the filter description for the set of conditions.

public sealed string GetDescription()

LoadCollection

Loads the collection from the specified XML.

public sealed void LoadCollection(string xml)

New

Adds a new condition to the collection.

public sealed IFilterCondition New(IField field)

public sealed IFilterCondition New(Guid fieldID)

SaveCollection

Saves the collection to an XML document.

public sealed string SaveCollection()

Item

Example

// This example adds a filter condition of City = "Berlin" to a report.
// In this code, selectedReport is an IReport object and app is a
// Stonefield Query Application object.

IFilterCondition condition = selectedReport.FilterConditions
   .New(app.DataDictionary.Fields["Customers.City"]);
if (selectedReport.FilterConditions.Count > 0)
{
   condition.Connection = new AndConnection();
}
condition.Operator = new OperatorEquals();
condition.Values.Add("Berlin");

Requirements

Namespace: Stonefield.Query.Filtering
Assembly: filtering.dll