com.crystaldecisions.sdk.occa.report.data
Class SummaryField

java.lang.Object
  extended by com.crystaldecisions.sdk.occa.report.data.Field
      extended by com.crystaldecisions.sdk.occa.report.data.SummaryField
All Implemented Interfaces:
IField, ISummaryField, ISummaryFieldBase, IClone

public class SummaryField
extends Field
implements ISummaryField, IClone

This object is used to calculate a summary for a group, or for the entire report.


Constructor Summary
SummaryField()
           For internal use only.
SummaryField(ISummaryField 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)
           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)
           
 ControllableMixin getControllableMixin()
           
 java.lang.String getDisplayName(FieldDisplayNameType displayName, java.util.Locale locale)
           Returns the name of the field that has been formatted according to the value of the parameter displayNameType.
 java.lang.String getFormulaForm()
           Returns the name of the field as it will be used in a formula.
 IGroup getGroup()
          Returns the group for which the summary is being calculated.
 boolean getIsPrintTime()
           
 FieldKind getKind()
           Returns what kind of field this is.
 java.lang.String getLongName(java.util.Locale locale)
           Returns the fully qualified name of the field.
 SummaryOperation getOperation()
          Returns the manner in which the summary will be calculated.
 int getOperationParameter()
          Gets the operation parameter.
 IField getSecondarySummarizedField()
          Gets the secondary summarized field.
 IGroup getSecondGroupForPercentage()
          Gets the group that is used for the percentage summary.
 java.lang.String getShortName(java.util.Locale locale)
           Returns the short name of the field.
 IField getSummarizedField()
          Returns the field that is being used to calculate the summary.
 boolean hasContent(java.lang.Object srcSummaryField)
           
 boolean hasContent(java.lang.Object srcSummaryField, IGroup containerGroup)
           
 boolean isDirectlyControllable()
           
 boolean isPercentageSummary()
          Gets whether the summary calculates the percentage total of one group within a broader grouping.
 boolean isSummarizedAcrossHierarchy()
          Gets whether the summary is calculated across hierarchical groupings.
 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 setGroup(IGroup group)
          Sets the group for which the summary is being calculated.
 void setOperation(SummaryOperation operation)
          Sets the manner in which the summary will be calculated.
 void setOperationParameter(int parameter)
          Sets the operation parameter.
 void setPercentageSummary(boolean percentageSummary)
          Sets whether the summary calculates the percentage total of one group within a broader grouping.
 void setSecondarySummarizedField(IField summarizedField)
          Sets the secondary summarized field.
 void setSecondGroupForPercentage(IGroup secondGroup)
          Sets the group that is used for the percentage summary.
 void setSummarizedAcrossHierarchy(boolean sumAcrossHierarchy)
          Sets whether the summary is calculated across hierarchical groupings.
 void setSummarizedField(IField summarizedField)
          Sets the field that is being used to calculate the summary.
 void startElement(java.lang.String eleName, java.util.Map objState, org.xml.sax.Attributes attrs)
           For internal use only.
 
Methods inherited from class com.crystaldecisions.sdk.occa.report.data.Field
getAttributes, getDescription, getHeadingText, getIsRecurring, getLength, getName, getType, setAttributes, setDescription, setHeadingText, setLength, setName, setType
 
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, getHeadingText, getIsRecurring, getLength, getName, getType, setDescription, setHeadingText, setLength, setName, setType
 

Constructor Detail

SummaryField

public SummaryField(ISummaryField src)

SummaryField

public SummaryField()

For internal use only.

Method Detail

clone

public java.lang.Object clone(boolean deepClone)
Overrides:
clone in class Field

copyTo

public void copyTo(java.lang.Object destObject,
                   boolean deepCopy)
Overrides:
copyTo in class Field

createMember

public java.lang.Object createMember(java.lang.String eleName,
                                     org.xml.sax.Attributes attrs,
                                     XMLSerializationContext ctxt,
                                     java.util.Map objState,
                                     boolean[] bLoaded)

For internal use only.

Overrides:
createMember in class Field

endElement

public void endElement(java.lang.String eleName,
                       java.util.Map objState)
Description copied from class: Field

For internal use only.

Overrides:
endElement in class Field

getDisplayName

public java.lang.String getDisplayName(FieldDisplayNameType displayName,
                                       java.util.Locale locale)
Description copied from interface: IField

Returns the name of the field that has been formatted according to the value of the parameter displayNameType.

Specified by:
getDisplayName in interface IField
Overrides:
getDisplayName in class Field
Parameters:
displayName - Indicates how the display text should be formatted. It may be one of the values listed under FieldDisplayNameType.
locale - Formats the string according to a locale.
Returns:
A String containing the name of the field that has been formatted according to the value of the parameter displayNameType.

getFormulaForm

public java.lang.String getFormulaForm()
Description copied from interface: IField

Returns the name of the field as it will be used in a formula. This is a unique identifier to avoid ambiguity in formula code. It is the same value as the one used in the CRW formula editor.

Specified by:
getFormulaForm in interface IField
Overrides:
getFormulaForm in class Field
Returns:
A String containing the name of the field as it will be used in a formula.

getGroup

public IGroup getGroup()
Description copied from interface: ISummaryField
Returns the group for which the summary is being calculated.

Specified by:
getGroup in interface ISummaryField
Returns:
An IGroup object containing the group for which the summary field is being calculated.

getKind

public FieldKind getKind()
Description copied from interface: 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.

Specified by:
getKind in interface IField
Returns:
A String that specifies what kind of field this is.

getIsPrintTime

public boolean getIsPrintTime()
Overrides:
getIsPrintTime in class Field

getLongName

public java.lang.String getLongName(java.util.Locale locale)
Description copied from interface: IField

Returns the fully qualified name of the field.

Specified by:
getLongName in interface IField
Overrides:
getLongName in class Field
Parameters:
locale - The locale that will be used to localize the field.
Returns:
A String containing the fully qualified name of the field.

getOperation

public SummaryOperation getOperation()
Description copied from interface: ISummaryFieldBase
Returns the manner in which the summary will be calculated.

Specified by:
getOperation in interface ISummaryFieldBase
Returns:
A SummaryOperation object that specifies the manner in which the summary will be calculated.

getOperationParameter

public int getOperationParameter()
Description copied from interface: ISummaryFieldBase
Gets the operation parameter. Most SummaryOperation types do not need a parameter, however, some summary operations (i.e., "Nth Largest, N is") require an integer parameter.

Specified by:
getOperationParameter in interface ISummaryFieldBase
Returns:
an int parameter for the SummaryOperation
See Also:
ISummaryFieldBase.getOperation()

getSecondarySummarizedField

public IField getSecondarySummarizedField()
Description copied from interface: ISummaryFieldBase
Gets the secondary summarized field.

Specified by:
getSecondarySummarizedField in interface ISummaryFieldBase
Returns:
the secondary summarized field

setSecondarySummarizedField

public void setSecondarySummarizedField(IField summarizedField)
Description copied from interface: ISummaryFieldBase
Sets the secondary summarized field.

Specified by:
setSecondarySummarizedField in interface ISummaryFieldBase
Parameters:
summarizedField - the secondary summarized field

getSecondGroupForPercentage

public IGroup getSecondGroupForPercentage()
Description copied from interface: ISummaryField
Gets the group that is used for the percentage summary.

Specified by:
getSecondGroupForPercentage in interface ISummaryField
Returns:
the IGroup used for the percentage summary
See Also:
ISummaryField.isPercentageSummary()

setSecondGroupForPercentage

public void setSecondGroupForPercentage(IGroup secondGroup)
Description copied from interface: ISummaryField
Sets the group that is used for the percentage summary.

Specified by:
setSecondGroupForPercentage in interface ISummaryField
Parameters:
secondGroup - the IGroup to use for the percentage summary
See Also:
ISummaryField.setPercentageSummary(boolean)

isPercentageSummary

public boolean isPercentageSummary()
Description copied from interface: ISummaryField
Gets whether the summary calculates the percentage total of one group within a broader grouping. For example, you can show the percentage of sales in each city based on the total sales for each country.

Note: The percentage option is valid only when the result of a summary operation is numeric.

Specified by:
isPercentageSummary in interface ISummaryField
Returns:
true if the percentage summary is enabled, false if it is disabled
See Also:
ISummaryField.getSecondGroupForPercentage()

setPercentageSummary

public void setPercentageSummary(boolean percentageSummary)
Description copied from interface: ISummaryField
Sets whether the summary calculates the percentage total of one group within a broader grouping. For example, you can show the percentage of sales in each city based on the total sales for each country.

Specified by:
setPercentageSummary in interface ISummaryField
Parameters:
percentageSummary - true to enable percentage summary, false to disable it
See Also:
ISummaryField.setSecondGroupForPercentage(IGroup)

isSummarizedAcrossHierarchy

public boolean isSummarizedAcrossHierarchy()
Description copied from interface: ISummaryField
Gets whether the summary is calculated across hierarchical groupings.

Specified by:
isSummarizedAcrossHierarchy in interface ISummaryField
Returns:
true if the summary is calculated across hierarchical groupings, false if it is not

setSummarizedAcrossHierarchy

public void setSummarizedAcrossHierarchy(boolean sumAcrossHierarchy)
Description copied from interface: ISummaryField
Sets whether the summary is calculated across hierarchical groupings.

Specified by:
setSummarizedAcrossHierarchy in interface ISummaryField
Parameters:
sumAcrossHierarchy - true to enable calculating the summary across hierarchical groupings, false to disable it

getShortName

public java.lang.String getShortName(java.util.Locale locale)
Description copied from interface: IField

Returns the short name of the field.

Specified by:
getShortName in interface IField
Overrides:
getShortName in class Field
Parameters:
locale - The locale that will be used to localize the field name.
Returns:
A String containing the short name of the field.

getSummarizedField

public IField getSummarizedField()
Description copied from interface: ISummaryFieldBase
Returns the field that is being used to calculate the summary.

Specified by:
getSummarizedField in interface ISummaryFieldBase
Returns:
An IField object containing the field that is being used to calculate the summary.

hasContent

public boolean hasContent(java.lang.Object srcSummaryField)
Overrides:
hasContent in class Field

hasContent

public boolean hasContent(java.lang.Object srcSummaryField,
                          IGroup containerGroup)

readElement

public void readElement(java.lang.String eleName,
                        java.lang.String sVal,
                        org.xml.sax.Attributes attrs,
                        java.util.Map objState)
Description copied from class: Field

For internal use only.

Overrides:
readElement in class Field

save

public void save(XMLWriter writer,
                 XMLSerializationContext ctxt)
          throws java.io.IOException

For internal use only.

Overrides:
save in class Field
Throws:
java.io.IOException

save

public void save(XMLWriter writer,
                 java.lang.String sTag,
                 XMLSerializationContext ctxt)
          throws java.io.IOException

For internal use only.

Overrides:
save in class Field
Throws:
java.io.IOException

saveContents

public void saveContents(XMLWriter writer,
                         XMLSerializationContext ctxt)
                  throws java.io.IOException
Description copied from class: Field

For internal use only.

Overrides:
saveContents in class Field
Throws:
java.io.IOException

setGroup

public void setGroup(IGroup group)
Description copied from interface: ISummaryField
Sets the group for which the summary is being calculated.

Specified by:
setGroup in interface ISummaryField
Parameters:
group - An IGroup object containing the group for which the summary field is being calculated.

setOperation

public void setOperation(SummaryOperation operation)
Description copied from interface: ISummaryFieldBase
Sets the manner in which the summary will be calculated.

Specified by:
setOperation in interface ISummaryFieldBase
Parameters:
operation - A SummaryOperation object that specifies the manner in which the summary will be calculated.

setOperationParameter

public void setOperationParameter(int parameter)
Description copied from interface: ISummaryFieldBase
Sets the operation parameter. Most SummaryOperation types do not need a parameter, however, some summary operations (i.e., "Nth Largest, N is") require an integer parameter.

Specified by:
setOperationParameter in interface ISummaryFieldBase
Parameters:
parameter - the int parameter used by the SummaryOperation
See Also:
ISummaryFieldBase.setOperation(SummaryOperation)

setSummarizedField

public void setSummarizedField(IField summarizedField)
Description copied from interface: ISummaryFieldBase
Sets the field that is being used to calculate the summary.

Specified by:
setSummarizedField in interface ISummaryFieldBase
Parameters:
summarizedField - An IField object containing the field that is being used to calculate the summary.

startElement

public void startElement(java.lang.String eleName,
                         java.util.Map objState,
                         org.xml.sax.Attributes attrs)
Description copied from class: Field

For internal use only.

Overrides:
startElement in class Field

getControllableMixin

public ControllableMixin getControllableMixin()
Overrides:
getControllableMixin in class Field

doControllerModification

public void doControllerModification(java.lang.Object newObject)
                              throws ReportSDKException
Throws:
ReportSDKException

isDirectlyControllable

public boolean isDirectlyControllable()

enumerateMembers

public void enumerateMembers(IMemberVisitor visitor)