|
|||||||||
| 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,
XMLSerializationContext ctxt,
java.util.Map objState,
boolean[] bLoaded)
|
void |
endElement(java.lang.String eleName,
java.util.Map objState)
|
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. |
IFormula |
getFormula(TranslatableStringId id)
For internal use only |
java.lang.String |
getImageKey()
For internal use only. |
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. |
int |
getNumInstances()
For internal use only. |
IClone |
getTranslatableObject()
For internal use only |
java.lang.String |
getTranslatableString(TranslatableStringId id)
For internal use only |
java.util.List |
getTranslatableStringIds()
For internal use only |
java.lang.String |
getTranslatableStringLabelResourceID(TranslatableStringId id)
For internal use only |
java.lang.String |
getTriggeredMessage()
For internal use only. |
boolean |
hasContent(java.lang.Object obj)
|
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 |
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 |
setAlertConditionFormula(IDataConditionFormula newConditionFormula)
For internal use only |
void |
setAlertMessageFormula(IDataConditionFormula newMessageFormula)
For internal use only |
void |
setConditionFilter(IFilter conditionFilter)
Sets the filter to determine if the alert should be 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 |
setMessageFormula(IFormulaField messageFormula)
Sets the formula to create the message to display if the alert is triggered. |
void |
setName(java.lang.String newName)
Sets the name of the alert. |
void |
setNumInstances(int nInstances)
For internal use only. |
void |
setTranslatableString(TranslatableStringId id,
java.lang.String newText)
For internal use only |
void |
setTriggeredMessage(java.lang.String message)
For internal use only. |
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 |
| 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,
XMLSerializationContext ctxt,
java.util.Map objState,
boolean[] bLoaded)
public void endElement(java.lang.String eleName,
java.util.Map objState)
public IFilter getConditionFilter()
IAlertReturns 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 IAlertIFilter object.public void setConditionFilter(IFilter conditionFilter)
IAlertSets 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.
setConditionFilter in interface IAlertconditionFilter - The IFilter object.public IDataConditionFormula getAlertConditionFormula()
IAlert
getAlertConditionFormula in interface IAlertpublic 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 IAlertString.public IFormulaField getMessageFormula()
IAlertReturns 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 IAlertIFormulaField object.public void setMessageFormula(IFormulaField messageFormula)
IAlertSets 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).
setMessageFormula in interface IAlertmessageFormula - The IFormulaField object.public IDataConditionFormula getAlertMessageFormula()
IAlert
getAlertMessageFormula in interface IAlertpublic java.lang.String getName()
IAlertReturns the name of the alert.
getName in interface IAlertString.public boolean hasContent(java.lang.Object obj)
public boolean isEnable()
IAlertReturns whether the alert is enabled and can be triggered.
isEnable in interface IAlerttrue if the alert is enabled and can be triggered, and
false otherwise.public java.lang.String[] parseMessageFormula()
IAlertParses 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 IAlertStrings that can be used in the Java Interactive Viewer's
search control.public java.lang.String getTriggeredMessage()
getTriggeredMessage in interface IAlert
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 setAlertConditionFormula(IDataConditionFormula newConditionFormula)
IAlert
setAlertConditionFormula in interface IAlertpublic void setEnable(boolean newEnable)
IAlertSets whether the alert is enabled and can be triggered.
setEnable in interface IAlertnewEnable - 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).
Using a message formula overrides the message string set using this method.
setMessage in interface IAlertnewMessage - the message to be set.public void setAlertMessageFormula(IDataConditionFormula newMessageFormula)
IAlert
setAlertMessageFormula in interface IAlertpublic void setName(java.lang.String newName)
IAlertSets the name of the alert.
setName in interface IAlertnewName - The name of the alert as a String.
public void startElement(java.lang.String eleName,
java.util.Map objState,
org.xml.sax.Attributes attrs)
public void setTriggeredMessage(java.lang.String message)
public void setNumInstances(int nInstances)
public int getNumInstances()
public java.util.List getTranslatableStringIds()
public java.lang.String getTranslatableString(TranslatableStringId id)
public void setTranslatableString(TranslatableStringId id,
java.lang.String newText)
public java.lang.String getTranslatableStringLabelResourceID(TranslatableStringId id)
public IFormula getFormula(TranslatableStringId id)
public IClone getTranslatableObject()
public java.lang.String getImageKey()
For internal use only.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||