|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.crystaldecisions.sdk.occa.report.data.Field
com.crystaldecisions.sdk.occa.report.data.FormulaField
public class FormulaField
This object implements a formula field in the report.
Use the IFormulaField
interface to access
this object. To modify formula fields in a report,
use the DataDefController
.
Constructor Summary | |
---|---|
FormulaField()
|
|
FormulaField(IFormulaField src)
|
Method Summary | |
---|---|
java.lang.Object |
clone(boolean deepClone)
|
void |
copyTo(java.lang.Object destObject,
boolean deepCopy)
|
void |
doControllerModification(java.lang.Object newObject)
|
void |
enumerateMembers(IMemberVisitor visitor)
|
ControllableMixin |
getControllableMixin()
|
FormulaNullTreatment |
getFormulaNullTreatment()
Returns how to treat null values in the evaluation of a formula. |
boolean |
getIsPrintTime()
|
boolean |
getIsRecurring()
Returns true if the field is recurring, and false otherwise. |
FieldKind |
getKind()
Returns what kind of field this is. |
int |
getOptions()
For internal use only. |
java.lang.String |
getShortName(java.util.Locale locale)
Returns the short name of the field. |
FormulaSyntax |
getSyntax()
Returns the syntax used to write the formula. |
java.lang.String |
getText()
Returns the formula string. |
boolean |
hasContent(java.lang.Object srcFormulaField)
|
boolean |
isDirectlyControllable()
|
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(XMLWriter writer,
java.lang.String sTag,
XMLSerializationContext ctxt)
For internal use only. |
void |
save(XMLWriter writer,
XMLSerializationContext ctxt)
For internal use only. |
void |
saveContents(XMLWriter writer,
XMLSerializationContext ctxt)
For internal use only. |
void |
setFormulaNullTreatment(FormulaNullTreatment treatment)
Sets how to treat null values in the evaluation of a formula. |
void |
setOptions(int options)
For internal use only. |
void |
setSyntax(FormulaSyntax syntax)
Sets the syntax used to write the formula. |
void |
setText(java.lang.String text)
Sets the formula string. |
Methods inherited from class com.crystaldecisions.sdk.occa.report.data.Field |
---|
createMember, endElement, getAttributes, getDescription, getDisplayName, getFormulaForm, getHeadingText, getLength, getLongName, getName, getType, setAttributes, setDescription, setHeadingText, setLength, setName, setType, startElement |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface com.crystaldecisions.sdk.occa.report.data.IField |
---|
getDescription, getDisplayName, getFormulaForm, getHeadingText, getLength, getLongName, getName, getType, setDescription, setHeadingText, setLength, setName, setType |
Constructor Detail |
---|
public FormulaField(IFormulaField src)
public FormulaField()
Method Detail |
---|
public java.lang.Object clone(boolean deepClone)
clone
in class Field
public void copyTo(java.lang.Object destObject, boolean deepCopy)
copyTo
in class Field
public boolean getIsRecurring()
IField
Returns true
if the field is recurring, and false
otherwise. A
field is recurring if its contents change during the formatting of a report. A constant field
(not recurring) is one that doesn't change. The special field "Page Number," for example, is
a recurring field, while the special field "Report Title" is not.
getIsRecurring
in interface IField
getIsRecurring
in class Field
true
if the field is recurring, and false
otherwise.public boolean getIsPrintTime()
getIsPrintTime
in class Field
public FieldKind getKind()
IField
Returns what kind of field this is. Do not confuse this property with Type. Kind identifies what sort of report field this is, while Type identifies what the field is composed of. For example, a bitmap, string, chart, number, date, and so on.
getKind
in interface IField
String
that specifies what kind of field this is.public int getOptions()
IFormulaField
For internal use only.
getOptions
in interface IFormulaField
public java.lang.String getShortName(java.util.Locale locale)
IField
Returns the short name of the field.
getShortName
in interface IField
getShortName
in class Field
locale
- The locale that will be used to localize the field name.
String
containing the short name of the field.public FormulaSyntax getSyntax()
IFormula
Returns the syntax used to write the formula.
getSyntax
in interface IFormula
FormulaSyntax
object.public java.lang.String getText()
IFormula
Returns the formula string.
getText
in interface IFormula
String
.public FormulaNullTreatment getFormulaNullTreatment()
IFormula
Returns how to treat null values in the evaluation of a formula.
By default, null values are treated as exceptions, which means that as soon as RAS encounters a null valued field in a formula, it immediately stops evaluating the formula and produces no value.
If you want to handle null field values in your formula, you must explicitly do so by adding a test function such as IsNull(). You also have the option to treat nulls as default values. The following are the default values for different types used in a formula.
getFormulaNullTreatment
in interface IFormula
FormulaNullTreatment
object that specifies how to treat
null values in the evaluation of a formula.public boolean hasContent(java.lang.Object srcFormulaField)
hasContent
in class Field
public void readElement(java.lang.String eleName, java.lang.String sVal, org.xml.sax.Attributes attrs, java.util.Map objState)
Field
For internal use only.
readElement
in class Field
public void save(XMLWriter writer, XMLSerializationContext ctxt) throws java.io.IOException
For internal use only.
save
in class Field
java.io.IOException
public void save(XMLWriter writer, java.lang.String sTag, XMLSerializationContext ctxt) throws java.io.IOException
For internal use only.
save
in class Field
java.io.IOException
public void saveContents(XMLWriter writer, XMLSerializationContext ctxt) throws java.io.IOException
For internal use only.
saveContents
in class Field
java.io.IOException
public void setOptions(int options)
IFormulaField
For internal use only.
setOptions
in interface IFormulaField
public void setSyntax(FormulaSyntax syntax)
IFormula
Sets the syntax used to write the formula.
setSyntax
in interface IFormula
syntax
- The FormulaSyntax
object.public void setText(java.lang.String text)
IFormula
Sets the formula string.
setText
in interface IFormula
text
- The formula as a String
.public void setFormulaNullTreatment(FormulaNullTreatment treatment)
IFormula
Sets how to treat null values in the evaluation of a formula.
By default, null values are treated as exceptions, which means that as soon as RAS encounters a null valued field in a formula, it immediately stops evaluating the formula and produces no value.
If you want to handle null field values in your formula, you must explicitly do so by adding a test function such as IsNull(). You also have the option to treat nulls as default values. The following are the default values for different types used in a formula.
setFormulaNullTreatment
in interface IFormula
treatment
- The FormulaNullTreatment
object that specifies how to treat null values
in the evaluation of a formula.public ControllableMixin getControllableMixin()
getControllableMixin
in class Field
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 |