public class CrossTabBody
extends java.lang.Object
implements java.io.Serializable
Modifier and Type | Method and Description |
---|---|
SummaryField |
addSummaryField(Field field,
int operation)
Add a summary to the crosstab.
|
CrossTabBodyCell |
getCell(int idx)
Get the ith cell of the body.
|
CrossTabBodyCell |
getCell(int rowIdx,
int columnIdx)
Get the cell that is related to the row header and column header.
|
int |
getCellCount()
Get the count of cells in the body.
|
SummaryField |
getSummaryField(int index)
Returns the i-th summary fields of the crosstab.
|
int |
getSummaryFieldsCount()
Returns the number of summary fields of the crosstab.
|
void |
moveSummaryField(int from,
int to)
Move the position of a summary field
|
void |
removeSummaryField(int index)
Removes the ith summary field in from the crosstab.
|
public int getCellCount()
public void removeSummaryField(int index) throws ReportException
index
- Index of the summary field.ReportException
- if crosstab has no summary field or index is out of bounds.java.lang.IllegalArgumentException
- in case the index is negative.public void moveSummaryField(int from, int to)
from
- original position in the range from 0 to getSummaryFieldsCount() -1to
- new position in the range from 0 to getSummaryFieldsCount() -1java.lang.IllegalArgumentException
- if a index is out of range@Nonnull public SummaryField getSummaryField(int index)
index
- The 0-based index of the required field.public int getSummaryFieldsCount()
public SummaryField addSummaryField(@Nonnull Field field, int operation)
field
- the that should be to sum.operation
- the summary operation. Must be a valid constant from SummaryField
public CrossTabBodyCell getCell(int idx)
idx
- the 0 based index.getCell(int, int)
@Nonnull public CrossTabBodyCell getCell(int rowIdx, int columnIdx)
rowIdx
- the 0 based index of the rows.columnIdx
- the 0 based index of the columnsjava.lang.IllegalStateException
- if the crosstab is corrupt and the cell can not be found.Copyright © 1999-2020 by i-net software GmbH