|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.crystaldecisions.sdk.occa.report.application.FilterController
public class FilterController
This object is used to modify filters in a report. Filters are used in record selection and group selection formulas.
If you add a filter that has an invalid syntax, the method that you are using will not fail; instead, an error is returned when you try to view the report.
Tip: To access theFilterController
object, use the
DataDefController.getGroupFilterController()
method or the
DataDefController.getRecordFilterController()
property in the
DataDefController
object.
Method Summary | |
---|---|
boolean |
canFilterOn(IField field)
Returns true if the field can be filtered, and false otherwise. |
java.lang.String |
getFormulaText()
Returns the filter formula text for a particular record or group filter |
void |
modify(IFilter filter)
Modifies the filter for a particular record or group selection. |
void |
setFormulaText(java.lang.String text)
Modifies the filter formula text for a particular record or group filter. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public boolean canFilterOn(IField field)
Returns true
if the field can be filtered, and false
otherwise.
Use this method to determine if a field can be added to a record filter or a group filter. For example, a recurring field, formula field, or parameter field can be added to a record filter, whereas a summary field can be added only to a group filter. Only summary fields and formula fields can be used to filter groups.
field
- The field whose data is being filtered.
true
if the field can be filtered, and false
otherwise.public void modify(IFilter filter) throws ReportSDKException
filter
- The newly modified filter
ReportSDKException
public java.lang.String getFormulaText()
setFormulaText(java.lang.String)
public void setFormulaText(java.lang.String text) throws ReportSDKException
Modifies the filter formula text for a particular record or group filter.
This method will store the formula string in the FreeEditingText
property of
the Filter
object. The
FreeEditingText
property of the
Filter
object is a custom selection
formula that cannot be parsed.
Example:
This sample shows how to modify filters in a report. Filters are used in record selection and group selection to select specified data.
DataDefControlleer dataDefController = clientDoc.getDataDefController();
FilterController filterController = dataDefController.getRecordFilterController();
filterController.setFormulaText( "{Table.Field} = 'value'" );
text
- text of the formula to be set. This formula is used as a filter for either a
record or a group.
ReportSDKException
getFormulaText()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |