com.crystaldecisions.sdk.occa.report.data
Interface IFilter

All Superinterfaces:
IClone, IFormula
All Known Implementing Classes:
Filter

public interface IFilter
extends IFormula

This interface defines filters that are used in record selection and group selection. As the name implies, they are used to select specified data.

Note: The modifications you make to a filter are saved only if you have used a controller. Use the GroupFilterController and the RecordFilterController to modify the group formula and record formula respectively.


Method Summary
 java.lang.String computeText()
           Returns a String representation of the field value that can be used in a report formula.
 java.lang.String displayText(FieldDisplayNameType displayNameType, java.util.Locale locale)
           Returns a UI-friendly string representation of the filter.
 FilterType getFilterType()
          Gets the type of this filter.
 java.lang.String getFreeEditingText()
          Deprecated. please use getText()
 java.lang.String getName()
          Returns the name of the filter.
 void setFilterType(FilterType filterType)
          Sets the type of this filter.
 void setFreeEditingText(java.lang.String freeEditingText)
          Deprecated. please use setText(String)
 void setName(java.lang.String name)
          Sets the name of the filter.
 
Methods inherited from interface com.crystaldecisions.sdk.occa.report.data.IFormula
getFormulaNullTreatment, getSyntax, getText, setFormulaNullTreatment, setSyntax, setText
 

Method Detail

computeText

java.lang.String computeText()

Returns a String representation of the field value that can be used in a report formula. The string is not formatted or localized. The syntax will always be Crystal syntax.

If the field contains a date, computeText returns Date(x, x, x); if it contains a date and time, computeText returns DateTime(x, x, x, x, x, x). However, when the date is 1900, 0, 1 (the Java start date), computeText returns Time(x, x, x). If you want to set a field to a time value only (that is, with no date), you should set the date to 1900, 0, 1, so that computeText will retrieve the correct information.

Returns:
A String representation of the field value that can be used in a report formula.

displayText

java.lang.String displayText(FieldDisplayNameType displayNameType,
                             java.util.Locale locale)

Returns a UI-friendly string representation of the filter. This method attempts to structure the filter formula as close to a localized phrase as possible. If you do not pass in a locale, it attempts to localize the string using the user's default locale.

If the field contains a date, displayText returns a locale-specific Date string; if it contains a date and time, displayText returns a locale-specific DateTime string; if it contains a time string, displayText returns a locale-specific Time string.

Parameters:
displayNameType - Indicates how the name of the field is displayed.
locale - Localizes the string according to a specific locale.
Returns:
A UI-friendly string representation of the filter.

getFilterType

FilterType getFilterType()
Gets the type of this filter.

Returns:
the FilterType of this filter

getFreeEditingText

java.lang.String getFreeEditingText()
Deprecated. please use getText()

Returns the formula text that was originally used to define the filter.

Returns:
A String containing the formula text that was originally used to define the filter.

getName

java.lang.String getName()
Returns the name of the filter.

Returns:
A String containing the name of the filter.

setFilterType

void setFilterType(FilterType filterType)
Sets the type of this filter.

Parameters:
filterType - a FilterType

setFreeEditingText

void setFreeEditingText(java.lang.String freeEditingText)
Deprecated. please use setText(String)

Sets the formula text that will be used to define the filter.

Parameters:
freeEditingText - A String containing the formula text that was originally used to define the filter.

setName

void setName(java.lang.String name)
Sets the name of the filter.

Parameters:
name - A String containing the name of the filter.