A FilterCondition object contains the properties for a condition in the filter or exclusion filter for a report. This object has no methods.
To create a new filter condition, call the AddItem method of the FilterConditions collection and either pass it the name of the field for the filter condition or set the FieldName property of the returned FilterCondition object.
Properties
All properties are read-write.
Name | Data Type | Description |
---|---|---|
AskAtRuntime | Boolean | True if this is an "ask-at-runtime" condition and False (the default) if not. |
CaseSensitive | Boolean | True if this is a case-sensitive condition (the default) and False if not. |
Condition | String | The condition as it appears in the WHERE clause of a SQL statement. You don't have to set the value of this property (it's determined automatically), but can reference it if needed. |
Connection | String | The connection to the previous condition (AND or OR, with or without parentheses). |
Display | String | The condition as displayed to the user. You don't have to set the value of this property (it's determined automatically), but can reference it if needed. |
FieldName | String | The aliased field name the condition filters on. |
IgnoreCondition | Boolean | True to ignore this condition when the report is run. |
IncludeInDisplay | Boolean | True if this condition is included in the filter display (the default). Set it to False if you don't want the user to see this condition. |
Operator | String | The descriptive name for the operator used for the filter:
|
Values | Collection | A collection of the values to compare to the field. Use the Count property to determine how many values there are and the Item method to return a particular value. To add a value to the collection, use code like:
FilterCondition.Values.Add(SomeValue) |
ValueType | String | The type of value being compared to the field: "Value," "Field," or "Expression." |
Here's an example that adds a filter condition of City = "Berlin" to a report; this code could be used in a DataEngine.FinalizeSQLStatement script, for example:
Visual FoxPro
loCondition = toApplication.DataEngine.FilterConditions.AddItem('Customers.City')
loCondition.Connection = 'and'
loCondition.Operator = 'equals'
loCondition.Values.Add('Berlin')
VBScript
Condition = Application.DataEngine.FilterConditions.AddItem("Customers.City")
Condition.Connection = "and"
Condition.Operator = "equals"
Condition.Values.Add("Berlin")
JavaScript
var Condition;
Condition = Application.DataEngine.FilterConditions.AddItem("Customers.City");
Condition.Connection = "and";
Condition.Operator = "equals";
Condition.Values.Add("Berlin");
C#
FilterCondition Condition = sfqApplication.DataEngine.FilterConditions.AddItem("Customers.City");
Condition.Connection = "and";
Condition.Operator = "equals";
Condition.Values.Add("Berlin");
VB.NET
dim Condition as FilterCondition = sfqApplication.DataEngine.FilterConditions.AddItem("Customers.City")
Condition.Connection = "and"
Condition.Operator = "equals"
Condition.Values.Add("Berlin")
See also
Collections | FilterConditions Collection© Stonefield Software Inc., 2023 • Updated: 12/21/18
Comment or report problem with topic