|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
public interface IAlert
This interface represents an alert contained in a report. This object provides properties for getting information on alerts in the report. Alerts are custom messages that appear when certain conditions are met by data in a report.
An alert may indicate action to be taken by the user or information about report data. Alerts are created from formulas that evaluate conditions you specify. If the condition is true, the alert is triggered and its message is displayed in Crystal Report Writer (CRW) or the Crystal Report viewers. Messages can be text strings or formulas that combine text and report fields. Once an alert is triggered, it is not evaluated again until you refresh your report's data.
| Method Summary | |
|---|---|
IDataConditionFormula |
getAlertConditionFormula()
For internal use only |
IDataConditionFormula |
getAlertMessageFormula()
For internal use only |
IFilter |
getConditionFilter()
Returns the filter to determine if the alert should be triggered. |
java.lang.String |
getMessage()
Returns the default message to display if the alert is triggered. |
IFormulaField |
getMessageFormula()
Returns the formula to create the message to display if the alert is triggered. |
java.lang.String |
getName()
Returns the name of the alert. |
java.lang.String |
getTriggeredMessage()
For internal use only. |
boolean |
isEnable()
Returns whether the alert is enabled and can be triggered. |
java.lang.String[] |
parseMessageFormula()
Parses the message formula in order to generate a list of message strings. |
void |
setAlertConditionFormula(IDataConditionFormula oVal)
For internal use only |
void |
setAlertMessageFormula(IDataConditionFormula oVal)
For internal use only |
void |
setConditionFilter(IFilter oVal)
Sets the filter to determine if the alert should be triggered. |
void |
setEnable(boolean bVal)
Sets whether the alert is enabled and can be triggered. |
void |
setMessage(java.lang.String sVal)
Sets the default message to display if the alert is triggered. |
void |
setMessageFormula(IFormulaField oVal)
Sets the formula to create the message to display if the alert is triggered. |
void |
setName(java.lang.String sVal)
Sets the name of the alert. |
| Method Detail |
|---|
IFilter getConditionFilter()
Returns the filter to determine if the alert should be triggered.
The condition filter's selection formula can be based on recurring records or on summary fields, but cannot be based on print-time fields, such as running totals or print-time formulas.
If an alert filter is based on a summary field, any recurring fields used must be constant over the summary field.
For example, in a "Customer Sales" report in which Last Year's Sales are grouped by Country, Region, and City, you may want to create an alert that is triggered when sales are below a certain limit. You can do this by creating a summary of the field Customer.Last Year's Sales and using the summary type Sum. In this case, your formula can refer to either Country or Region, but not City or Customer Name since these are not constant.
IFilter object.IDataConditionFormula getAlertConditionFormula()
java.lang.String getMessage()
Returns the default message to display if the alert is triggered. This is the default message
that will be used every time your alert is triggered. If you want your message to be
customized with data elements, use IAlert.setAlertMessageFormula(IDataConditionFormula).
MessageFormula overrides the values set using IAlert.setMessage(java.lang.String).
String.IFormulaField getMessageFormula()
Returns the formula to create the message to display if the alert is triggered. The result of the formula must be a string, and is created by combining a string with a report field.
For example, if you want to see the message "Country is a star performer" (where Country is
the name of a specific country), you might create the following formula:
GroupNameField.LongName + " is a star performer." If the MessageFormula is
set, it will override the value set using IAlert.setMessage(java.lang.String).
IFormulaField object.IDataConditionFormula getAlertMessageFormula()
java.lang.String getName()
Returns the name of the alert.
String.boolean isEnable()
Returns whether the alert is enabled and can be triggered.
true if the alert is enabled and can be triggered, and
false otherwise.java.lang.String[] parseMessageFormula()
Parses the message formula in order to generate a list of message strings. This method returns an array of strings that can be used in the Java Interactive Viewer's search control.
Strings that can be used in the Java Interactive Viewer's
search control.void setAlertConditionFormula(IDataConditionFormula oVal)
void setConditionFilter(IFilter oVal)
Sets the filter to determine if the alert should be triggered. The condition filter's selection formula can be based on recurring records or on summary fields, but cannot be based on print-time fields, such as running totals or print-time formulas.
If an alert filter is based on a summary field, any recurring fields used must be constant over the summary field.
For example, in a "Customer Sales" report in which Last Year's Sales are grouped by Country, Region, and City, you may want to create an alert that is triggered when sales are below a certain limit. You can do this by creating a summary of the field Customer.Last Year's Sales and using the summary type Sum. In this case, your formula can refer to either Country or Region, but not City or Customer Name since these are not constant.
oVal - The IFilter object.void setEnable(boolean bVal)
Sets whether the alert is enabled and can be triggered.
bVal - true if the alert is enabled and can be triggered, and
false otherwise.void setMessage(java.lang.String sVal)
Sets the default message to display if the alert is triggered. This is the default message
that will be used every time your alert is triggered. If you want your message to be
customized with data elements, use IAlert.setAlertMessageFormula(IDataConditionFormula).
Using a message formula overrides the message string set using this method.
sVal - the message to be set.void setAlertMessageFormula(IDataConditionFormula oVal)
void setMessageFormula(IFormulaField oVal)
Sets the formula to create the message to display if the alert is triggered. The result of the formula must be a string, and is created by combining a string with a report field.
For example, if you want to see the message "Country
is a star performer" (where Country is the name of a specific
country), you might create the following formula:
GroupNameField.LongName + " is a star performer."
If the MessageFormula is set, it will override
the value set using IAlert.setMessage(java.lang.String).
oVal - The IFormulaField object.void setName(java.lang.String sVal)
Sets the name of the alert.
sVal - The name of the alert as a String.java.lang.String getTriggeredMessage()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||