|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.ObjectFormula
com.crystaldecisions.sdk.occa.report.data.Filter
public class Filter
This object defines filters that are used in record selection and group selection. As the name implies,
they are used to select specified data. Initially, the filter is a simple string written in Crystal
syntax. When the file is opened, the string is parsed into an array of FilterItems, which is
stored in the Filter object's FilterItems property. When possible, use the IFilter
interface to manipulate this object.
| Constructor Summary | |
|---|---|
Filter()
|
|
Filter(FilterType filterType)
|
|
Filter(IFilter src)
|
|
| Method Summary | |
|---|---|
java.lang.Object |
clone(boolean deepClone)
|
java.lang.String |
computeText()
Returns a String representation of the field value that can be used in a
report formula. |
void |
copyTo(java.lang.Object destObject,
boolean deepCopy)
|
java.lang.Object |
createMember(java.lang.String eleName,
org.xml.sax.Attributes attrs,
XMLSerializationContext ctxt,
java.util.Map objState,
boolean[] bLoaded)
|
java.lang.String |
displayText(FieldDisplayNameType type,
java.util.Locale locale)
Returns a UI-friendly string representation of the filter. |
void |
endElement(java.lang.String eleName,
java.util.Map objState)
|
FilterItems |
getFilterItems()
Returns the result of a parsed filter string. |
FilterType |
getFilterType()
For internal use only |
java.lang.String |
getFreeEditingText()
Returns the formula text that was originally used to define the filter. |
java.lang.String |
getName()
Returns the name of the filter. |
java.lang.String |
getText()
|
boolean |
hasContent(java.lang.Object srcFilter)
|
void |
readElement(java.lang.String eleName,
java.lang.String sVal,
org.xml.sax.Attributes attrs,
java.util.Map objState)
|
void |
save(XMLWriter writer,
java.lang.String sTag,
XMLSerializationContext ctxt)
|
void |
save(XMLWriter writer,
XMLSerializationContext ctxt)
|
void |
saveContents(XMLWriter writer,
XMLSerializationContext ctxt)
|
void |
setFilterItems(FilterItems filterItems)
Sets the result of a parsed filter string. |
void |
setFilterType(FilterType filterType)
For internal use only |
void |
setFreeEditingText(java.lang.String freeEditingText)
Sets the formula text that will be used to define the filter. |
void |
setName(java.lang.String name)
Sets the name of the filter. |
void |
setText(java.lang.String text)
|
void |
startElement(java.lang.String eleName,
java.util.Map objState,
org.xml.sax.Attributes attrs)
|
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface com.crystaldecisions.sdk.occa.report.data.IFilter |
|---|
getFormulaNullTreatment, setFormulaNullTreatment |
| Constructor Detail |
|---|
public Filter(IFilter src)
public Filter()
public Filter(FilterType filterType)
| Method Detail |
|---|
public java.lang.Object clone(boolean deepClone)
public java.lang.String computeText()
IFilter
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.
computeText in interface IFilterString representation of the field value that can be used in a
report formula.
public void copyTo(java.lang.Object destObject,
boolean deepCopy)
public java.lang.Object createMember(java.lang.String eleName,
org.xml.sax.Attributes attrs,
XMLSerializationContext ctxt,
java.util.Map objState,
boolean[] bLoaded)
public java.lang.String displayText(FieldDisplayNameType type,
java.util.Locale locale)
IFilterReturns 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.
displayText in interface IFiltertype - Indicates how the name of the field is displayed.locale - Localizes the string according to a specific locale.
public void endElement(java.lang.String eleName,
java.util.Map objState)
public FilterItems getFilterItems()
IFilterReturns the result of a parsed filter string. When a filter string is parsed, it is broken into the following categories:
FieldRangeFilterItem).
OperatorFilterItem).
getFreeEditingText method to check whether the formula was
parsed successfully. If it is empty, then the parsing was successful.
Note: If you modify the filter using this method, the FreeEditingText property will not be updated.
getFilterItems in interface IFilterFilterItems object containing the result of a parsed filter string.public java.lang.String getFreeEditingText()
IFilter
Returns the formula text that was originally used to define the filter. This
String will be empty if the formula was successfully parsed into the
FilterItems property. If the formula text was too complicated to be parsed, this property
will still contain the formula text and the getFilterItems method
will return null.
Note: If you modify the filter using this property, the FilterItems property will not be updated until the file is saved and reopened--regardless of whether the initial parsing was successful or not.
getFreeEditingText in interface IFilterString containing the formula text that was originally used to
define the filter.public java.lang.String getText()
public void setText(java.lang.String text)
public java.lang.String getName()
IFilter
getName in interface IFilterString containing the name of the filter.public boolean hasContent(java.lang.Object srcFilter)
public void readElement(java.lang.String eleName,
java.lang.String sVal,
org.xml.sax.Attributes attrs,
java.util.Map objState)
public void save(XMLWriter writer,
XMLSerializationContext ctxt)
throws java.io.IOException
java.io.IOException
public void save(XMLWriter writer,
java.lang.String sTag,
XMLSerializationContext ctxt)
throws java.io.IOException
java.io.IOException
public void saveContents(XMLWriter writer,
XMLSerializationContext ctxt)
throws java.io.IOException
java.io.IOExceptionpublic void setFilterItems(FilterItems filterItems)
IFilterSets the result of a parsed filter string. When a filter string is parsed, it is broken into the following categories:
FieldRangeFilterItem).
OperatorFilterItem).
getFreeEditingText method to check whether the formula was
parsed successfully. If it is empty, then the parsing was successful.
Note: If you modify the filter using this method, the FreeEditingText property will not be updated.
setFilterItems in interface IFilterfilterItems - A FilterItems object containing the result of a parsed
filter string.public void setFreeEditingText(java.lang.String freeEditingText)
IFilter
Sets the formula text that will be used to define the filter. This String will
be empty if the formula is successfully parsed into the FilterItems property. If the formula
text is too complicated to be parsed, this property will still contain the formula text and
the getFilterItems method will return null.
Note: If you modify the filter using this property, the FilterItems property will not be updated until the file is saved and reopened--regardless of whether the initial parsing was successful or not.
setFreeEditingText in interface IFilterfreeEditingText - A String containing the formula text that was
originally used to define the filter.public void setName(java.lang.String name)
IFilter
setName in interface IFiltername - A String containing the name of the filter.
public void startElement(java.lang.String eleName,
java.util.Map objState,
org.xml.sax.Attributes attrs)
public FilterType getFilterType()
IFilter
getFilterType in interface IFilterpublic void setFilterType(FilterType filterType)
IFilter
setFilterType in interface IFilter
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||