|
|||||||||
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()
Returns the filter to determine if the alert should be triggered. |
IDataConditionFormula |
getAlertMessageFormula()
Returns the formula to create the message to display if the alert is triggered. |
IFilter |
getConditionFilter()
Deprecated. replaced by getAlertConditionFormula |
java.lang.String |
getMessage()
Returns the default message to display if the alert is triggered. |
IFormulaField |
getMessageFormula()
Deprecated. replaced by getAlertMessageFormula |
java.lang.String |
getName()
Returns the name of the alert. |
Strings |
getTriggeredMessages(int numOfInstances)
Returns the triggered messages for the specified maximum number of instances of this alert This method returns an array of strings |
boolean |
isEnable()
Returns whether the alert is enabled and can be triggered. |
java.lang.String[] |
parseMessageFormula()
Deprecated. replaced by getTriggeredMessages |
void |
setAlertConditionFormula(IDataConditionFormula oVal)
Sets the filter to determine if the alert should be triggered. |
void |
setAlertMessageFormula(IDataConditionFormula oVal)
Sets the formula to create the message to display if the alert is 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 |
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.
com.crystaldecisions.sdk.occa.report.data.IFilter
object.IDataConditionFormula getAlertConditionFormula()
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.
com.crystaldecisions.sdk.occa.report.data.IFilter
object.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 setAlertMessageFormula(IDataConditionFormula)
.
MessageFormula overrides the values set using 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 setMessage(java.lang.String)
.
com.crystaldecisions.sdk.occa.report.data.IFormulaField
object.IDataConditionFormula getAlertMessageFormula()
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 setMessage(java.lang.String)
.
com.crystaldecisions.sdk.occa.report.data.IDataConditionFormula
object.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.Strings getTriggeredMessages(int numOfInstances) throws ReportSDKException
Returns the triggered messages for the specified maximum number of instances of this alert This method returns an array of strings
Strings
as the triggered instances of the alerts.
ReportSDKException
void setAlertConditionFormula(IDataConditionFormula 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 com.crystaldecisions.sdk.occa.report.data.IDataConditionFormula
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 setAlertMessageFormula(IDataConditionFormula)
MessageFormula overrides the values set using this method.
sVal
- the message to be set.void setAlertMessageFormula(IDataConditionFormula 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 setMessage(java.lang.String)
.
oVal
- The com.crystaldecisions.sdk.occa.report.data.IDataConditionFormula
object.void setName(java.lang.String sVal)
Sets the name of the alert.
sVal
- The name of the alert as a String
.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |