|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.crystaldecisions.sdk.occa.report.data.Alert
public class Alert
This object represents an alert contained in a report.
When possible use the IAlert
interface.
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.
For more information, see Report Alerts in the Crystal Reports online help.
Constructor Summary | |
---|---|
Alert()
|
|
Alert(IAlert src)
|
Method Summary | |
---|---|
java.lang.Object |
clone(boolean deepClone)
|
void |
copyTo(java.lang.Object destObject,
boolean deepCopy)
|
java.lang.Object |
createMember(java.lang.String eleName,
org.xml.sax.Attributes attrs,
com.crystaldecisions.xml.serialization.XMLSerializationContext ctxt,
java.util.Map objState,
boolean[] bLoaded)
For internal use only. |
void |
doControllerModification(java.lang.Object newObject)
|
void |
endElement(java.lang.String eleName,
java.util.Map objState)
For internal use only. |
void |
enumerateMembers(IMemberVisitor visitor)
|
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 |
ControllableMixin |
getControllableMixin()
|
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 |
hasContent(java.lang.Object obj)
|
void |
internalSetTriggeredMessages(Strings messages)
Deprecated. |
boolean |
isDirectlyControllable()
|
boolean |
isEnable()
Returns whether the alert is enabled and can be triggered. |
java.lang.String[] |
parseMessageFormula()
Deprecated. replaced by getTriggeredMessages |
void |
readElement(java.lang.String eleName,
java.lang.String sVal,
org.xml.sax.Attributes attrs,
java.util.Map objState)
For internal use only. |
void |
save(com.crystaldecisions.xml.serialization.XMLWriter writer,
com.crystaldecisions.xml.serialization.XMLSerializationContext ctxt)
For internal use only. |
void |
save(com.crystaldecisions.xml.serialization.XMLWriter writer,
java.lang.String sTag,
com.crystaldecisions.xml.serialization.XMLSerializationContext ctxt)
For internal use only. |
void |
saveContents(com.crystaldecisions.xml.serialization.XMLWriter writer,
com.crystaldecisions.xml.serialization.XMLSerializationContext ctxt)
For internal use only. |
void |
setAlertConditionFormula(IDataConditionFormula newConditionFormula)
Sets the filter to determine if the alert should be triggered. |
void |
setAlertMessageFormula(IDataConditionFormula newMessageFormula)
Sets the formula to create the message to display if the alert is triggered. |
void |
setEnable(boolean newEnable)
Sets whether the alert is enabled and can be triggered. |
void |
setMessage(java.lang.String newMessage)
Sets the default message to display if the alert is triggered. |
void |
setName(java.lang.String newName)
Sets the name of the alert. |
void |
startElement(java.lang.String eleName,
java.util.Map objState,
org.xml.sax.Attributes attrs)
For internal use only. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Alert(IAlert src)
public Alert()
Method Detail |
---|
public java.lang.Object clone(boolean deepClone)
public void copyTo(java.lang.Object destObject, boolean deepCopy)
public java.lang.Object createMember(java.lang.String eleName, org.xml.sax.Attributes attrs, com.crystaldecisions.xml.serialization.XMLSerializationContext ctxt, java.util.Map objState, boolean[] bLoaded)
For internal use only.
public void endElement(java.lang.String eleName, java.util.Map objState)
For internal use only.
public IFilter getConditionFilter()
IAlert
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.
getConditionFilter
in interface IAlert
com.crystaldecisions.sdk.occa.report.data.IFilter
object.public IDataConditionFormula getAlertConditionFormula()
IAlert
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.
getAlertConditionFormula
in interface IAlert
com.crystaldecisions.sdk.occa.report.data.IFilter
object.public java.lang.String getMessage()
IAlert
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)
.
getMessage
in interface IAlert
String
.public IFormulaField getMessageFormula()
IAlert
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)
.
getMessageFormula
in interface IAlert
com.crystaldecisions.sdk.occa.report.data.IFormulaField
object.public IDataConditionFormula getAlertMessageFormula()
IAlert
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)
.
getAlertMessageFormula
in interface IAlert
com.crystaldecisions.sdk.occa.report.data.IDataConditionFormula
object.public java.lang.String getName()
IAlert
Returns the name of the alert.
getName
in interface IAlert
String
.public boolean hasContent(java.lang.Object obj)
public boolean isEnable()
IAlert
Returns whether the alert is enabled and can be triggered.
isEnable
in interface IAlert
true
if the alert is enabled and can be triggered, and
false
otherwise.public java.lang.String[] parseMessageFormula()
IAlert
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.
parseMessageFormula
in interface IAlert
Strings
that can be used in the Java Interactive Viewer's
search control.public void readElement(java.lang.String eleName, java.lang.String sVal, org.xml.sax.Attributes attrs, java.util.Map objState)
For internal use only.
public void save(com.crystaldecisions.xml.serialization.XMLWriter writer, com.crystaldecisions.xml.serialization.XMLSerializationContext ctxt) throws java.io.IOException
For internal use only.
java.io.IOException
public void save(com.crystaldecisions.xml.serialization.XMLWriter writer, java.lang.String sTag, com.crystaldecisions.xml.serialization.XMLSerializationContext ctxt) throws java.io.IOException
For internal use only.
java.io.IOException
public void saveContents(com.crystaldecisions.xml.serialization.XMLWriter writer, com.crystaldecisions.xml.serialization.XMLSerializationContext ctxt) throws java.io.IOException
For internal use only.
java.io.IOException
public void setAlertConditionFormula(IDataConditionFormula newConditionFormula)
IAlert
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.
setAlertConditionFormula
in interface IAlert
newConditionFormula
- The com.crystaldecisions.sdk.occa.report.data.IDataConditionFormula
object.public void setEnable(boolean newEnable)
IAlert
Sets whether the alert is enabled and can be triggered.
setEnable
in interface IAlert
newEnable
- true
if the alert is enabled and can be triggered, and
false
otherwise.public void setMessage(java.lang.String newMessage)
IAlert
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)
MessageFormula overrides the values set using this method.
setMessage
in interface IAlert
newMessage
- the message to be set.public void setAlertMessageFormula(IDataConditionFormula newMessageFormula)
IAlert
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)
.
setAlertMessageFormula
in interface IAlert
newMessageFormula
- The com.crystaldecisions.sdk.occa.report.data.IDataConditionFormula
object.public void setName(java.lang.String newName)
IAlert
Sets the name of the alert.
setName
in interface IAlert
newName
- The name of the alert as a String
.public void startElement(java.lang.String eleName, java.util.Map objState, org.xml.sax.Attributes attrs)
For internal use only.
public Strings getTriggeredMessages(int numOfInstances) throws ReportSDKException
IAlert
Returns the triggered messages for the specified maximum number of instances of this alert This method returns an array of strings
getTriggeredMessages
in interface IAlert
Strings
as the triggered instances of the alerts.
ReportSDKException
public void internalSetTriggeredMessages(Strings messages)
For internal use only.
public ControllableMixin getControllableMixin()
public void doControllerModification(java.lang.Object newObject) throws ReportSDKException
ReportSDKException
public boolean isDirectlyControllable()
public void enumerateMembers(IMemberVisitor visitor)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |