i-net Clear Reports

com.inet.report
Class CrossTab

java.lang.Object
  extended by com.inet.report.ReportComponent
      extended by com.inet.report.Element
          extended by com.inet.report.CrossTab
All Implemented Interfaces:
BorderProperties, GeneralProperties, HyperlinkProperties, NodeParser, com.inet.report.ReferenceHolder, java.io.ObjectInputValidation, java.io.Serializable, java.lang.Cloneable

public class CrossTab
extends Element
implements com.inet.report.ReferenceHolder, java.io.ObjectInputValidation, HyperlinkProperties

This class represents a cross table that has been or should be drawn in a report. A cross table is a report to summarize and visualize data in a compact form with rows and columns, so you can better compare data. Use this class to get or set properties. You can create and add a new cross table element with Section.addCrossTab(int, int, SummaryField) method in class Section. The last Argument of the method is the field the cross table needs at least. To add more summarize fields use the methods appendSummaryField(SummaryField). To add a row or a column use methods appendColumn(Field) and appendRow(Field).

This class is part of the RDC.

See Also:
Section.addCrossTab(int,int,SummaryField), Section.remove(Element), Section.getElements(), Section.getElementsV(), CrossTabCell, CrossTabColumn, CrossTabRow, Serialized Form

Field Summary
 
Fields inherited from class com.inet.report.Element
BOX, CHART, CROSSTAB, CROSSTABCELL, CROSSTABCOLUMN, CROSSTABROW, CROSSTABSECTION, DATABASE_PICTURE, FIELD, FIELDPART, JAVABEAN, LINE, PARAGRAPH, PICTURE, SIGNATURE, SUBREPORT, TEXT, TEXTPART
 
Fields inherited from interface com.inet.report.BorderProperties
LINE_STYLE_DASHED, LINE_STYLE_DOTTED, LINE_STYLE_DOUBLE, LINE_STYLE_SINGLE, NO_LINE
 
Fields inherited from interface com.inet.report.GeneralProperties
ALIGN_HORIZONTAL_CENTER, ALIGN_HORIZONTAL_DEFAULT, ALIGN_HORIZONTAL_JUSTIFIED, ALIGN_HORIZONTAL_LEFT, ALIGN_HORIZONTAL_RIGHT
 
Method Summary
 SummaryField addSummaryField(Field sourceField, int operation)
          Create a summary field to be used for this crosstab.
 CrossTabColumn appendColumn(Field f)
          Use this method to add a new column based on the field f to this crosstab.
 CrossTabRow appendRow(Field f)
          Use this method to add a new row based on the field f to this crosstab
 void appendSummaryField(Field summaryField, int operation)
          Append a summary that should be visible in the crosstab.
 void appendSummaryField(SummaryField summaryField)
          Append a summary that should be visible in the crosstab.
 void dropColumn(int index)
          Removes the i-th column of the crosstab.
 void dropRow(int index)
          Removes the i-th row of the crosstab.
 void dropSummaryField(int index)
          Removes the ith summary field in from the crosstab.
 CrossTabCell getCell(int idx)
          Returns the i-th cell of the crosstab.
 int getCellCount()
          Returns the number of cells of the crosstab.
 CrossTabColumn getColumn(int i)
          Returns the i-th column of the crosstab.
 int getColumnCount()
          Returns the number of column of the crosstab.
 int getColumnGrandTotalColor()
          Returns the value of the property 'column grand total color'.
 FormulaField getColumnGrandTotalColorFormula()
          Returns the formula for the property 'column grand total color'.
 boolean getColumnTotalOnLeft()
          Returns whether Column Total should be on left (true) or not (false).
 FormulaField getColumnTotalOnLeftFormula()
          Returns the formula for the property 'total column on left'.
 CrossTabGridLineFormat[] getCrossTabGridLineFormat()
          Returns the gridline format of the crosstab.
 CrossTabDescriptionSection getDescriptionSection()
          Gets the description section of the crosstab.
 boolean getIndentRowLabel()
          Returns whether the row label should be indent (true) or not (false).
 int getIndentRowLabelSize()
          Returns the size of indentation of the row label in twips.
 boolean getKeepColumnsTogether()
          Returns the value of the property "Keep Columns Together".
 java.util.List getPropertyFormulas()
          Returns a list with all property formulas that are set for this report element.
 boolean getRepeatRowLabels()
          Returns whether row labels should be repeated (true) or not (false).
 CrossTabRow getRow(int i)
          Returns the i-th row of the crosstab.
 int getRowCount()
          Returns the number of rows of the crosstab.
 int getRowGrandTotalColor()
          Returns the background color of the grand total row as ABGR, i.e. 0x000000FF for red.
 FormulaField getRowGrandTotalColorFormula()
          Returns the formula of the background color of the grand total row as ABGR, i.e. 0x000000FF for red.
 boolean getRowTotalOnTop()
          Returns whether Row Total should be on top (true) or not (false).
 FormulaField getRowTotalOnTopFormula()
          Returns the formula for the property 'row total on top'.
 boolean getShowCellMargins()
          Returns whether cell margins should be shown (true) or not (false).
 boolean getShowGrid()
          Returns if the crosstab gridlines are enabled or disabled.
 SummaryField getSummaryField(int i)
          Returns the i-th summary fields of the crosstab.
 int getSummaryFieldsCount()
          Returns the number of summary fields of the crosstab.
 boolean getSuppressColumnGrandTotals()
          Returns the value of the property 'suppress column grand'.
 FormulaField getSuppressColumnGrandTotalsFormula()
          Returns the formula for the property 'suppress column grand'.
 boolean getSuppressEmptyColumns()
          Returns whether empty columns should be suppressed (true) or not (false).
 FormulaField getSuppressEmptyColumnsFormula()
          Returns the formula for the property 'suppress empty columns'.
 boolean getSuppressEmptyRows()
          Returns whether empty rows should be suppressed (true) or not (false).
 FormulaField getSuppressEmptyRowsFormula()
          Returns the formula for the property 'suppress empty rows'.
 boolean getSuppressRowGrandTotals()
          Returns the value the property 'suppress row grand totals'.
 FormulaField getSuppressRowGrandTotalsFormula()
          Returns the formula for the property 'suppress row grand'.
 boolean getWrapEnabled()
          Returns the behavior of small crosstabs if they do not fit the page.
 void setColumnGrandTotalColor(int columnGrandTotalColor)
          Sets the background color of the grand total column, that is the last column in cross table.
 void setColumnGrandTotalColorFormula(FormulaField newFormula)
          Sets the formula of background color of the grand total column, that is the last column in cross table.
 void setColumnTotalOnLeft(boolean value)
          Sets whether Column Total should be drawn on left side (true) or not (false).
 void setColumnTotalOnLeftFormula(FormulaField newFormula)
          Sets the formula for the property 'total column on left'.
 void setCrossTabGridLineFormat(CrossTabGridLineFormat[] gridLines)
          Sets the gridline format of the crosstab.
 void setHeight(int height)
          This element can not be resized.
 void setIndentRowLabel(boolean indentRowLabel)
          Sets whether the row label should be indent (true) or not (false).
 void setIndentRowLabelSize(int indentRowLabelSize)
          Sets the size of indentation of the row label for the crosstab's indent row label mode.
 void setKeepColumnsTogether(boolean keepColumnsTogether)
          Returns the value of the property "Keep Columns Together".
 void setRepeatRowLabels(boolean repeatRowLabels)
          Sets whether Row Labels should be repeated (true) or not (false).
 void setRowGrandTotalColor(int rowGrandTotalColor)
          Sets the background color of the grand total row, the last row in the cross table.
 void setRowGrandTotalColorFormula(FormulaField newFormula)
          Sets the formula of the background color of the grand total row, the last row in the cross table.
 void setRowTotalOnTop(boolean value)
          Use this method to move the total row to the top of the crosstab.
 void setRowTotalOnTopFormula(FormulaField newFormula)
          Sets the formula for the property 'total row an top'.
 void setShowCellMargins(boolean showCellMargins)
          Sets whether cell margins should be shown (true) or not (false).
 void setShowGrid(boolean showGrid)
          Switch the crosstab gridlines on or off with this method.
 void setSuppressColumnGrandTotals(boolean suppressColumnGrand)
          Sets the value of the property 'suppress column grand'.
 void setSuppressColumnGrandTotalsFormula(FormulaField newFormula)
          Sets the formula for the property 'suppress column grand'.
 void setSuppressEmptyColumns(boolean suppressEmptyColumns)
          Sets whether empty columns should be suppressed (true) or not (false).
 void setSuppressEmptyColumnsFormula(FormulaField newFormula)
          Sets the formula for the property 'suppress empty rows'.
 void setSuppressEmptyRows(boolean suppressEmptyRows)
          Sets whether empty rows should be suppressed (true) or not (false).
 void setSuppressEmptyRowsFormula(FormulaField newFormula)
          Sets the formula for the property 'suppress empty rows'.
 void setSuppressRowGrandTotals(boolean suppressRowGrandTotals)
          Sets the value of the property 'suppress row grand totals'.
 void setSuppressRowGrandTotalsFormula(FormulaField newFormula)
          Sets the formula for the property 'suppress row grand'.
 void setWidth(int width)
          This element can not be resized.
 void setWrapEnabled(boolean value)
          Use this method to set the behavior of small crosstabs if they do not fit the page.
 void setX(int x)
          Sets the x position of the left upper corner of the crosstab in the report.
 void setY(int y)
          Sets the y position of the left upper corner of the crosstab in the report.
 void validateObject()
          Validates the object by update the crosstab listeners.
 
Methods inherited from class com.inet.report.Element
addListener, copy, copyXML2, getBottomLineStyle, getBottomLineStyleFormula, getCanGrowCount, getCanGrowFormula, getCloseBorderOnPageBreakFormula, getDropShadowFormula, getEngine, getField, getForeColor, getForeColorFormula, getHorAlign, getHorAlignFormula, getHyperlinkUrl, getHyperlinkUrlFormula, getLeftLineStyle, getLeftLineStyleFormula, getParent, getRightLineStyle, getRightLineStyleFormula, getSuppressIfDuplicatedFormula, getTightHorizontalFormula, getToolTipsText, getToolTipsTextFormula, getTopLineStyle, getTopLineStyleFormula, indexOf, isCanGrow, isCloseBorderOnPageBreak, isDropShadow, isSuppressIfDuplicated, isTightHorizontal, paramString, removeListener, setBottomLineStyle, setBottomLineStyleFormula, setCanGrow, setCanGrowCount, setCanGrowFormula, setCloseBorderOnPageBreak, setCloseBorderOnPageBreakFormula, setDropShadow, setDropShadowFormula, setField, setForeColor, setForeColorFormula, setHorAlign, setHorAlignFormula, setHyperlinkUrl, setHyperlinkUrlFormula, setIndex, setLeftLineStyle, setLeftLineStyleFormula, setRightLineStyle, setRightLineStyleFormula, setSuppressIfDuplicated, setSuppressIfDuplicatedFormula, setTightHorizontal, setTightHorizontalFormula, setToolTipsText, setToolTipsTextFormula, setTopLineStyle, setTopLineStyleFormula
 
Methods inherited from class com.inet.report.ReportComponent
getBackColor, getBackColorFormula, getHeight, getKeepTogetherFormula, getSuppressFormula, getType, getWidth, getX, getY, isKeepTogether, isSuppress, setBackColor, setBackColorFormula, setKeepTogether, setKeepTogetherFormula, setSuppress, setSuppressFormula
 
Methods inherited from interface com.inet.report.HyperlinkProperties
getHyperlinkUrl, getHyperlinkUrlFormula, setHyperlinkUrl, setHyperlinkUrlFormula
 
Methods inherited from interface com.inet.report.BorderProperties
getBackColor, getBackColorFormula, setBackColor, setBackColorFormula
 
Methods inherited from interface com.inet.report.GeneralProperties
getKeepTogetherFormula, getSuppressFormula, isKeepTogether, isSuppress, setKeepTogether, setKeepTogetherFormula, setSuppress, setSuppressFormula
 
Methods inherited from interface com.inet.report.parser.NodeParser
isDOMParser, parseDOM, parseElement, parseEndElement, parseText
 

Method Detail

getDescriptionSection

public CrossTabDescriptionSection getDescriptionSection()
Gets the description section of the crosstab. This section can be used to add additional descriptions or decoration to the crosstab. The description section is located in the upper left corner of the crosstab.

Returns:
The description section of the crosstab

dropColumn

public void dropColumn(int index)
                throws ReportException
Removes the i-th column of the crosstab. The index i must be greater than 0 and less than getColumnCount().

Parameters:
index - Index of the column.
Throws:
java.lang.IllegalArgumentException - if index is negative.
ReportException - if index is 0 (grand total).

dropRow

public void dropRow(int index)
             throws ReportException
Removes the i-th row of the crosstab. The index i must be greater than 0 and less than getRowCount().

Parameters:
index - Index of the row.
Throws:
java.lang.IllegalArgumentException - if index is negative.
ReportException - if index is 0 (grand total).

setWidth

public void setWidth(int width)
This element can not be resized. Invoking this methode will have no effect. The size of this element depends on the width and height of its sub elements.

Overrides:
setWidth in class ReportComponent
Parameters:
width - Setting the width of the Crosstab has no effect.

setHeight

public void setHeight(int height)
This element can not be resized. Invoking this methode will have no effect. The size of this element depends on the width and height of its sub elements.

Overrides:
setHeight in class ReportComponent
Parameters:
height - Setting the height of the Crosstab has no effect.

getRow

public CrossTabRow getRow(int i)
Returns the i-th row of the crosstab. The parameter i should be between 0 (grand total) and getRowCount().

Parameters:
i - 0-based index which specifies the column.
Returns:
The i-th row of the crosstab.

getColumn

public CrossTabColumn getColumn(int i)
Returns the i-th column of the crosstab. The parameter i should be between 0 (grand total) and getColumnCount().

Parameters:
i - 0-based index which specifies the column.
Returns:
The i-th column of the crosstab.

getCell

public CrossTabCell getCell(int idx)
Returns the i-th cell of the crosstab. The parameter i should be between 0 (grand total) and getCellCount().

Parameters:
idx - 0-based index which specifies the cell.
Returns:
The i-th cell of the crosstab.

getRowCount

public int getRowCount()
Returns the number of rows of the crosstab. A valid crosstab contains at least one row (grand total).

Returns:
The number of rows of the crosstab.

getColumnCount

public int getColumnCount()
Returns the number of column of the crosstab. A valid crosstab contains at least one column (grand total).

Returns:
The number of column of the crosstab.

getCellCount

public int getCellCount()
Returns the number of cells of the crosstab. Each Cell can contain multiple summary values.

Returns:
The number of cells of the crosstab.

getSummaryField

public SummaryField getSummaryField(int i)
Returns the i-th summary fields of the crosstab.

Parameters:
i - The 0-based index of the required field.
Returns:
The i-th summary field.
See Also:
appendSummaryField(SummaryField).

getSummaryFieldsCount

public int getSummaryFieldsCount()
Returns the number of summary fields of the crosstab.

Returns:
The number of summary fields.

setColumnGrandTotalColor

public void setColumnGrandTotalColor(int columnGrandTotalColor)
Sets the background color of the grand total column, that is the last column in cross table.
You can use the ABGR value (i.e. 0x000000FF for red) or one of the color constants in class CoderXML.
More information about the usage of colors in RDC can be found in the RDC documentation.

Parameters:
columnGrandTotalColor - the new ABGR value of the column grand total color.
Throws:
java.lang.IllegalArgumentException - if columnGrandTotalColor is less than CoderXML.COLOR_NO_COLOR (-1)
See Also:
RDC.toCcColor(Color), RDC.toJavaColor(int)

getColumnGrandTotalColor

public int getColumnGrandTotalColor()
Returns the value of the property 'column grand total color'.

Returns:
The integer value of the 'cloumn grand total color' property.
See Also:
setColumnGrandTotalColor(int)

setColumnGrandTotalColorFormula

public void setColumnGrandTotalColorFormula(FormulaField newFormula)
Sets the formula of background color of the grand total column, that is the last column in cross table.
You can use the ABGR value (i.e. 0x000000FF for red) or one of the color constants in class CoderXML.
More information about the usage of colors in RDC can be found in the RDC documentation.

Parameters:
newFormula - the new ABGR value of the column grand total color.
See Also:
RDC.toCcColor(Color), RDC.toJavaColor(int)

getColumnGrandTotalColorFormula

public FormulaField getColumnGrandTotalColorFormula()
Returns the formula for the property 'column grand total color'.

Returns:
FormulaField The formula for the property 'column grand total color'.

setShowGrid

public void setShowGrid(boolean showGrid)
Switch the crosstab gridlines on or off with this method.
If it is true then the crosstab gridlines will be displayed with the designed line style, color and width.

Parameters:
showGrid - true if the crosstab gridlines should be displayed, else false.
See Also:
getShowGrid()

getShowGrid

public boolean getShowGrid()
Returns if the crosstab gridlines are enabled or disabled.
If the value is false then the crosstab will be displayed without gridlines. If it is true then the crosstab gridlines will be displayed with the designed line style, color and width.

Returns:
true if the crosstab gridlines will be displayed, else false.
See Also:
setShowGrid(boolean)

setSuppressRowGrandTotals

public void setSuppressRowGrandTotals(boolean suppressRowGrandTotals)
Sets the value of the property 'suppress row grand totals'. If enabled no totals row will be printed.

Parameters:
suppressRowGrandTotals - true if the property should be set, else false.

getSuppressRowGrandTotals

public boolean getSuppressRowGrandTotals()
Returns the value the property 'suppress row grand totals'.

Returns:
true if the property has been set, else false.
See Also:
setSuppressRowGrandTotals(boolean)

setSuppressRowGrandTotalsFormula

public void setSuppressRowGrandTotalsFormula(FormulaField newFormula)
Sets the formula for the property 'suppress row grand'. If this property is enabled grand total row of the crosstab wont be printed.

Parameters:
newFormula - The new formula for the property 'suppress empty rows'.

getSuppressRowGrandTotalsFormula

public FormulaField getSuppressRowGrandTotalsFormula()
Returns the formula for the property 'suppress row grand'. If this property is enabled grand total row of the crosstab wont be printed.

Returns:
FormulaField The formula for the property 'suppress empty columns'.
Since:
7.0

setSuppressColumnGrandTotals

public void setSuppressColumnGrandTotals(boolean suppressColumnGrand)
Sets the value of the property 'suppress column grand'. If enabled no totals column will be printed.

Parameters:
suppressColumnGrand - true if the property should be set, else false.
Since:
7.0

getSuppressColumnGrandTotals

public boolean getSuppressColumnGrandTotals()
Returns the value of the property 'suppress column grand'.

Returns:
true if the property has been set, else false.
See Also:
setSuppressColumnGrandTotals(boolean)

setSuppressColumnGrandTotalsFormula

public void setSuppressColumnGrandTotalsFormula(FormulaField newFormula)
Sets the formula for the property 'suppress column grand'. If this property is enabled grand total column of the crosstab will be not printed.

Parameters:
newFormula - The new formula for the property 'suppress empty rows'.
Since:
7.0

getSuppressColumnGrandTotalsFormula

public FormulaField getSuppressColumnGrandTotalsFormula()
Returns the formula for the property 'suppress column grand'. If this property is enabled grand total column of the crosstab will be not printed.

Returns:
FormulaField The formula for the property 'suppress empty columns'.
Since:
7.0

setRowGrandTotalColor

public void setRowGrandTotalColor(int rowGrandTotalColor)
Sets the background color of the grand total row, the last row in the cross table.
You can use the ABGR value (i.e. 0x000000FF for red) or one of the color constants in class CoderXML.
More information about the usage of colors in RDC can be found in the RDC documentation.

Parameters:
rowGrandTotalColor - the new ABGR value of the grand total background color.
Throws:
java.lang.IllegalArgumentException - if columnGrandTotalColor is less than CoderXML.COLOR_NO_COLOR (-1)
See Also:
RDC.toCcColor(Color), RDC.toJavaColor(int)

getRowGrandTotalColor

public int getRowGrandTotalColor()
Returns the background color of the grand total row as ABGR, i.e. 0x000000FF for red.

Returns:
ABGR value of the grand total row background color or -1 if cross table contains no rows.
See Also:
setRowGrandTotalColor(int), RDC.toCcColor(Color), RDC.toJavaColor(int)

setRowGrandTotalColorFormula

public void setRowGrandTotalColorFormula(FormulaField newFormula)
Sets the formula of the background color of the grand total row, the last row in the cross table.
You can use the ABGR value (i.e. 0x000000FF for red) or one of the color constants in class CoderXML.
More information about the usage of colors in RDC can be found in the RDC documentation.

Parameters:
newFormula - the new ABGR value of the grand total background color.
See Also:
RDC.toCcColor(Color), RDC.toJavaColor(int)

getRowGrandTotalColorFormula

public FormulaField getRowGrandTotalColorFormula()
Returns the formula of the background color of the grand total row as ABGR, i.e. 0x000000FF for red.

Returns:
ABGR value of the grand total row background color or -1 if cross table contains no rows.
See Also:
setRowGrandTotalColor(int), RDC.toCcColor(Color), RDC.toJavaColor(int)

getColumnTotalOnLeft

public boolean getColumnTotalOnLeft()
Returns whether Column Total should be on left (true) or not (false).

Returns:
True if total row should be drawn on the left side or not.

setColumnTotalOnLeft

public void setColumnTotalOnLeft(boolean value)
Sets whether Column Total should be drawn on left side (true) or not (false).

Parameters:
value - The value of the property 'Column total on left'

setColumnTotalOnLeftFormula

public void setColumnTotalOnLeftFormula(FormulaField newFormula)
Sets the formula for the property 'total column on left'. If this property is enabled total column of the crosstab will be printed at the left side of the crosstab.

Parameters:
newFormula - The new formula for the property 'suppress empty rows'.

getColumnTotalOnLeftFormula

public FormulaField getColumnTotalOnLeftFormula()
Returns the formula for the property 'total column on left'. If this property is enabled total column of the crosstab will be printed on the left side of the crosstab.

Returns:
FormulaField The formula for the property 'suppress empty columns'.

setRowTotalOnTop

public void setRowTotalOnTop(boolean value)
Use this method to move the total row to the top of the crosstab. Sets whether Row Total should be drawn on top (true) or not (false).

Parameters:
value - The value of the property 'Row total on top'

getRowTotalOnTop

public boolean getRowTotalOnTop()
Returns whether Row Total should be on top (true) or not (false).

Returns:
True if total row should be drawn on the left side or not.

setRowTotalOnTopFormula

public void setRowTotalOnTopFormula(FormulaField newFormula)
Sets the formula for the property 'total row an top'. If this property is enabled total row of the crosstab will be printed at the top of the crosstab.

Parameters:
newFormula - The new formula for the property 'suppress empty rows'.

getRowTotalOnTopFormula

public FormulaField getRowTotalOnTopFormula()
Returns the formula for the property 'row total on top'. If this property is enabled total row of the crosstab will be printed on the top of the crosstab.

Returns:
FormulaField The formula for the property 'suppress empty columns'.

setRepeatRowLabels

public void setRepeatRowLabels(boolean repeatRowLabels)
Sets whether Row Labels should be repeated (true) or not (false).

Parameters:
repeatRowLabels - The value of the property 'repeat row labels'

getRepeatRowLabels

public boolean getRepeatRowLabels()
Returns whether row labels should be repeated (true) or not (false).

Returns:
True if row labels should be repeated, else false.

getSuppressEmptyColumns

public boolean getSuppressEmptyColumns()
Returns whether empty columns should be suppressed (true) or not (false).

Returns:
True if empty columns should be suppressed, else false

setSuppressEmptyColumns

public void setSuppressEmptyColumns(boolean suppressEmptyColumns)
Sets whether empty columns should be suppressed (true) or not (false). Sets the suppressEmptyColumns.

Parameters:
suppressEmptyColumns - The suppressEmptyColumns to set

setSuppressEmptyColumnsFormula

public void setSuppressEmptyColumnsFormula(FormulaField newFormula)
Sets the formula for the property 'suppress empty rows'. If this property is enabled empty rows of the crosstab will not be printed.

Parameters:
newFormula - The new formula for the property 'suppress empty rows'.
Since:
7.0

getSuppressEmptyColumnsFormula

public FormulaField getSuppressEmptyColumnsFormula()
Returns the formula for the property 'suppress empty columns'. If this property is enabled empty columns of the crosstab will not be printed.

Returns:
FormulaField The formula for the property 'suppress empty columns'.
Since:
7.0

getSuppressEmptyRows

public boolean getSuppressEmptyRows()
Returns whether empty rows should be suppressed (true) or not (false).

Returns:
True if empty rows should be suppressed, else false.

setSuppressEmptyRows

public void setSuppressEmptyRows(boolean suppressEmptyRows)
Sets whether empty rows should be suppressed (true) or not (false).

Parameters:
suppressEmptyRows - The suppressEmptyRows to set

setSuppressEmptyRowsFormula

public void setSuppressEmptyRowsFormula(FormulaField newFormula)
Sets the formula for the property 'suppress empty rows'. If this property is enabled empty rows of the crosstab will not be printed.

Parameters:
newFormula - The new formula for the property 'suppress empty rows'.
Since:
7.0

getSuppressEmptyRowsFormula

public FormulaField getSuppressEmptyRowsFormula()
Returns the formula for the property 'suppress empty rows'. If this property is enabled empty rows of the crosstab will not be printed.

Returns:
FormulaField The formula for the property 'suppress empty rows'.
Since:
7.0

getShowCellMargins

public boolean getShowCellMargins()
Returns whether cell margins should be shown (true) or not (false).

Returns:
True if cell margins should be shown, else false.

setShowCellMargins

public void setShowCellMargins(boolean showCellMargins)
Sets whether cell margins should be shown (true) or not (false). This will resize all elements of the crosstab to fit the cell by considering the margins.

Parameters:
showCellMargins - The showCellMargins to set

setKeepColumnsTogether

public void setKeepColumnsTogether(boolean keepColumnsTogether)
Returns the value of the property "Keep Columns Together".

Parameters:
keepColumnsTogether - true if the columns should not be split accross page boundaries.

getKeepColumnsTogether

public boolean getKeepColumnsTogether()
Returns the value of the property "Keep Columns Together".

Returns:
true if the columns should not be split accross page boundaries.

setWrapEnabled

public void setWrapEnabled(boolean value)
Use this method to set the behavior of small crosstabs if they do not fit the page. If true the crosstab will be wrapped and the second part will be put below the first. If false the second part of the crosstab will be put on the following page.

Parameters:
value - If true the crosstab will be wrapped and the second part will be put below the first.

getWrapEnabled

public boolean getWrapEnabled()
Returns the behavior of small crosstabs if they do not fit the page. If true the crosstab will be wrapped and the second part will be put below the first. If false the second part of the crosstab will be put on the following page.

Returns:
Behavior of the crosstab

getIndentRowLabel

public boolean getIndentRowLabel()
Returns whether the row label should be indent (true) or not (false).

Returns:
True if the crosstab will be drawn in indent rows label mode, else false.

setIndentRowLabel

public void setIndentRowLabel(boolean indentRowLabel)
Sets whether the row label should be indent (true) or not (false).

Parameters:
indentRowLabel - The indentRowLabel to set

getIndentRowLabelSize

public int getIndentRowLabelSize()
Returns the size of indentation of the row label in twips.

Returns:
The size of indentation of the row label.

setIndentRowLabelSize

public void setIndentRowLabelSize(int indentRowLabelSize)
Sets the size of indentation of the row label for the crosstab's indent row label mode.

Parameters:
indentRowLabelSize - The indentRowLabelSize to set in twips.
Throws:
java.lang.IllegalArgumentException - if indentRowLabelSize is negative

appendColumn

public CrossTabColumn appendColumn(Field f)
Use this method to add a new column based on the field f to this crosstab.

Parameters:
f - A formula or database-field to append at the end of the crosstab column.
Returns:
The created crosstab column.

appendRow

public CrossTabRow appendRow(Field f)
Use this method to add a new row based on the field f to this crosstab

Parameters:
f - A formula or database-field to append at the end of the crosstab rows.
Returns:
The created crosstab row.

addSummaryField

public SummaryField addSummaryField(Field sourceField,
                                    int operation)
                             throws ReportException
Create a summary field to be used for this crosstab. Once you've obtained the summary field, you can append it to the list of summary fields of the crosstab with appendSummaryField. You can use #appendSummaryField(Field field, int operation) instead.

Parameters:
sourceField - The field that should be used for the summary operation
operation - The summary operation (see class SummaryField).
Returns:
A summary field that can be appended to the list of visible summary fields of the crosstab.
Throws:
ReportException - If the summary operation is invalid.

appendSummaryField

public void appendSummaryField(Field summaryField,
                               int operation)
                        throws ReportException
Append a summary that should be visible in the crosstab. The parameter field will be used to create a summary which will be shown in the cells of the crosstab.

Parameters:
summaryField - The field that should be used for the summary operation.
operation - The summary operation (SummaryField).
Throws:
ReportException - if the summary operation is invalid.
Since:
6.0
See Also:
SummaryField

appendSummaryField

public void appendSummaryField(SummaryField summaryField)
                        throws java.lang.NullPointerException
Append a summary that should be visible in the crosstab. Please note that currently only summary fields obtained by #addSummaryField(Field, int) should be used as an argument. So you can use #appendSummaryField(Field field, int operation).

Parameters:
summaryField - The summary field obtained by #addSummaryField(SummaryField)
Throws:
java.lang.NullPointerException - if f is null.

getCrossTabGridLineFormat

public CrossTabGridLineFormat[] getCrossTabGridLineFormat()
Returns the gridline format of the crosstab. The grid lines of the crosstab are for the row labels (vertical-, horizontal-lines, top-, bottom-, left-, right -border)
and for the column labels (vertical-, horizontal-lines, top-, bottom-, left-, right -border)
and for the cells (vertical-, horizontal-lines, bottom-, right -border)
which are 16 lines total.

Returns:
The array[16] of CrossTabGridLineFormat

setCrossTabGridLineFormat

public void setCrossTabGridLineFormat(CrossTabGridLineFormat[] gridLines)
Sets the gridline format of the crosstab. The grid lines of the crosstab are for the row labels (vertical-, horizontal-lines, top-, bottom-, left-, right -border)
and for the column labels (vertical-, horizontal-lines, top-, bottom-, left-, right -border)
and for the cells (vertical-, horizontal-lines, bottom-, right -border)
which are 16 lines total.

Parameters:
gridLines - The grid line format array obtained from #getCrossTabGridLineFormat().
Throws:
java.lang.IllegalArgumentException - if the gridLines can not be cloned.

dropSummaryField

public void dropSummaryField(int index)
                      throws ReportException
Removes the ith summary field in from the crosstab.

Parameters:
index - Index of the summary field.
Throws:
java.lang.IllegalArgumentException - in case the index is negative.
ReportException - if crosstab has no summary field or index is out of bounds.

setX

public void setX(int x)
Sets the x position of the left upper corner of the crosstab in the report. The x positions of crosstab's subelements will be set relative to the new x value. Use the 'object x position' property the adjust the element position from the left side margin. The unit is in twips.

Overrides:
setX in class ReportComponent
Parameters:
x - The x position in twips.
Throws:
java.lang.IllegalArgumentException - if x is negative

setY

public void setY(int y)
Sets the y position of the left upper corner of the crosstab in the report. The y positions of crosstab's subelements will be set relative to the new y value. Use the 'object y position' property the adjust the element position from the top margin. The unit is in twips.

Overrides:
setY in class ReportComponent
Parameters:
y - The y position in twips.
Throws:
java.lang.IllegalArgumentException - if y is negative

getPropertyFormulas

public java.util.List getPropertyFormulas()
Returns a list with all property formulas that are set for this report element.

Overrides:
getPropertyFormulas in class Element
Returns:
List of property formulas

validateObject

public void validateObject()
                    throws java.io.InvalidObjectException
Validates the object by update the crosstab listeners.

Throws:
java.io.InvalidObjectException - If the object cannot validate itself.

i-net Clear Reports

Copyright © 1999-2011 by i-net software GmbH