com.businessobjects.rebean.wi
Interface ReportCell

All Superinterfaces:
Alertable, Attachable, Cell, Decoration, Filterable, Position, ReportElement, TreeNode, Unit

public interface ReportCell
extends Cell, Filterable

Warning: This interface is no longer functional from the SAP BusinessObjects 4.0 release onwards.

ReportCell is an extended Cell object that holds a ReportExpression value.

See Also:
ReportBody.createReportCell(ReportExpression), SectionContainer.createReportCell(ReportExpression)

Method Summary
 ReportExpression getExpr()
          Returns the ReportExpression displayed by this ReportCell.
 FormatNumber getFormatNumber()
          Returns the FormatNumber used for displaying values in this ReportCell.
 ReportExpression getNestedExpr()
          Returns the ReportExpression displayed in this ReportCell.
 boolean isCustomFormula()
          Returns true if the this cell contains a custom formula.
 boolean isSection()
          Returns true when this cell identifies a section.
 void setExpr(ReportExpression expr)
          Changes the ReportExpression displayed by this ReportCell.
 void setFormatNumber(FormatNumber format)
          Sets the FormatNumber used for displaying values in this ReportCell.
 FreeCell toFreeCell()
          Turns this ReportCell into a FreeCell.
 
Methods inherited from interface com.businessobjects.rebean.wi.Cell
avoidPageBreak, avoidPageBreak, estimateMinimalHeight, getContentType, getHeight, getHorizontalPadding, getVerticalPadding, getWidth, isAutoFitHeight, isAutoFitWidth, isShowWhenEmpty, repeatOnEveryPage, repeatOnEveryPage, setAutoFitHeight, setAutoFitWidth, setContentType, setHeight, setHorizontalPadding, setShowWhenEmpty, setVerticalPadding, setWidth
 
Methods inherited from interface com.businessobjects.rebean.wi.ReportElement
getFather, getID, getReportElement, getReportElement, getReportElementCount
 
Methods inherited from interface com.businessobjects.rebean.wi.TreeNode
getChildAt, getChildCount, getIndex, getParent, isLeaf
 
Methods inherited from interface com.businessobjects.rebean.wi.Decoration
getAlignment, getAttributes, getBackgroundAlignment, getFont, setAlignment, setAttributes, setBackgroundAlignment, setFont
 
Methods inherited from interface com.businessobjects.rebean.wi.Attachable
deleteAttachment, getAttachTo, getHAttachTo, getHorizontalAnchor, getVAttachTo, getVerticalAnchor, setAttachTo, setAttachTo
 
Methods inherited from interface com.businessobjects.rebean.wi.Position
getX, getY, setLocation, setX, setY
 
Methods inherited from interface com.businessobjects.rebean.wi.Unit
getUnit, setUnit
 
Methods inherited from interface com.businessobjects.rebean.wi.Alertable
getAlerters
 
Methods inherited from interface com.businessobjects.rebean.wi.Filterable
copyFilter, createFilter, getFilter, hasFilter, removeFilter
 

Method Detail

isSection

boolean isSection()
Returns true when this cell identifies a section. For each expression in a SectionContainer object's axis, a ReportCell is generated, displaying the value for the current section.

To get the SectionContainer holding this ReportCell, call

SectionContainer section = (SectionContainer) mySectionReportCell.getParent();.

Returns:
true when identifying a section
See Also:
SectionContainer.getSectionCells()

getExpr

ReportExpression getExpr()
Returns the ReportExpression displayed by this ReportCell.

Note: this will usually be a formula; try using getNestedExpr() instead of this function to return a ReportExpression contained in the ReportDictionary.

Returns:
the report expression this cell displays
See Also:
ReportDictionary, ReportExpression

getNestedExpr

ReportExpression getNestedExpr()
Returns the ReportExpression displayed in this ReportCell. If this cell displays the name of the expression, a value or the result of a calculation, this method always returns the base expression, unless the expression is a complex formula (for example, =[Revenue] / COUNT([Month])).

Returns:
the nested expression, or null the ReportCell does not contain an expression.

setExpr

void setExpr(ReportExpression expr)
Changes the ReportExpression displayed by this ReportCell. If it is not a FormulaExpression, the expression will be automatically transformed to a formula =expr.

Note: after calling this method, isSection returns false.

Note: no call to SectionContainer.getSectionCells() will return this cell.

Parameters:
expr - the report expression this cell will now display
Throws:
java.lang.NullPointerException - when expr is null

getFormatNumber

FormatNumber getFormatNumber()
Returns the FormatNumber used for displaying values in this ReportCell.

Returns:
the FormatNumber used for values in this cell, or null for the default format
Since:
6.5.0
See Also:
FormatNumber, FormatNumberType

setFormatNumber

void setFormatNumber(FormatNumber format)
Sets the FormatNumber used for displaying values in this ReportCell.

Parameters:
format - the format for values in this cell, or null for the default format
Since:
6.5.0
See Also:
FormatNumber, FormatNumberType

toFreeCell

FreeCell toFreeCell()
Turns this ReportCell into a FreeCell. The resulting cell has all the same attributes as this cell, but contains a text representation of the current expression.

Note: After calling this function, this cell is no longer part of the report and a new cell has taken its place.

Returns:
a free cell that replaces this cell
Since:
11.5
See Also:
FreeCell.toReportCell()

isCustomFormula

boolean isCustomFormula()
Returns true if the this cell contains a custom formula.

An expression is custom when it is a user-created formula (see ReportDictionary.createFormula(String)), that does not evaluate to a single object. For example, =[Revenue] is not custom, but =[Revenue]*2 is. Formulas that evaluate as text only (like ="text" for example) are never custom.

Returns:
true if the expression in this cell is a custom formula
Since:
11.5
See Also:
TableCell.isCustomFormula(), GraphAxisProperties.isCustomFormula(int)