public class TableReport extends Object implements JRReport
Modifier and Type | Class and Description |
---|---|
protected class |
TableReport.BandRowInfo |
protected class |
TableReport.CellInfo |
protected class |
TableReport.ColumnHeaderCreator |
protected class |
TableReport.DetailBandCreator |
protected class |
TableReport.GroupFooterCreator |
protected class |
TableReport.GroupHeaderCreator |
protected class |
TableReport.PageFooterCreator |
protected class |
TableReport.ReportBandCreator |
protected class |
TableReport.ReportBandInfo |
protected class |
TableReport.ReverseReportBandCreator |
protected class |
TableReport.SummaryCreator |
protected class |
TableReport.SummaryGroupFooterPrintWhenEvaluator |
protected static class |
TableReport.TableIndexProperties |
protected class |
TableReport.TitleCreator |
Modifier and Type | Field and Description |
---|---|
static String |
EXCEPTION_MESSAGE_KEY_FIELD_NOT_FOUND |
static String |
EXCEPTION_MESSAGE_KEY_UNKNOWN_CHILD_TYPE |
static String |
EXCEPTION_MESSAGE_KEY_UNRECOGNIZED_FILTER_EXPRESSION_TYPE |
static String |
EXCEPTION_MESSAGE_KEY_VARIABLE_NOT_FOUND |
protected static String |
HTML_CLASS_CELL |
protected static String |
HTML_CLASS_CELL_PREFIX |
static String |
PROPERTY_COLUMN_CONDITIONALLY_FORMATTABLE
Deprecated.
To be removed.
|
static String |
PROPERTY_COLUMN_FIELD
Column property that specifies the field to be used for sorting, filtering and conditional formatting
|
static String |
PROPERTY_COLUMN_FILTERABLE
Column property that enables/disables filtering
|
static String |
PROPERTY_COLUMN_SORTABLE
Column property that enables/disables sorting
|
static String |
PROPERTY_COLUMN_VARIABLE
Column property that specifies the variable to be used for sorting, filtering and conditional formatting
|
static String |
PROPERTY_DOWN_ARROW_CHAR
Global property that specifies the character to be used on the column header when the tables's column is sorted descending
|
static String |
PROPERTY_GENERATE_TABLE_PDF_TAGS
Property that enables/disables the automatic addition of specific custom properties to table cell elements,
that would in turn trigger the creation of special document accessibility tags during PDF export
|
static String |
PROPERTY_ICON_FONT
Global property that specifies the font to be used for the icons on the column header
|
static String |
PROPERTY_INTERACTIVE_TABLE
Property that enables/disables the interactivity in the table component
|
static String |
PROPERTY_UP_ARROW_CHAR
Global property that specifies the character to be used on the column header when the tables's column is sorted ascending
|
protected static String |
SUMMARY_GROUP_NAME |
static String |
TABLE_HEADER_ICON_LABEL_MATCHER_EXPORT_KEY |
static String |
TABLE_HEADER_LABEL_MATCHER_EXPORT_KEY |
protected static String |
TABLE_SCRIPTLET_NAME |
LANGUAGE_GROOVY, LANGUAGE_JAVA
Constructor and Description |
---|
TableReport(FillContext fillContext,
TableComponent table,
TableReportDataset mainDataset,
List<FillColumn> fillColumns,
BuiltinExpressionEvaluatorFactory builtinEvaluatorFactory) |
Modifier and Type | Method and Description |
---|---|
protected void |
addSummaryGroup(List<FillColumn> fillColumns) |
protected int |
computeTableWidth(List<FillColumn> fillColumns) |
protected JRElement |
createCell(JRElementGroup parentGroup,
Cell cell,
int originalWidth,
int width,
int x,
int y,
Integer columnHashCode,
boolean forceFrame) |
protected JRElement |
createCellElement(JRElementGroup elementGroup,
Cell cell,
int originalWidth,
int width,
int x,
int y,
Integer columnHashCode) |
protected JRDesignBand |
createColumnHeader(List<FillColumn> fillColumns) |
protected JRBand |
createDetailBand(List<FillColumn> fillColumns) |
protected JRBand |
createGroupFooter(String groupName,
List<FillColumn> fillColumns) |
protected JRBand |
createGroupHeader(String groupName,
List<FillColumn> fillColumns) |
protected JRDesignBand |
createPageFooter(List<FillColumn> fillColumns) |
protected JRDesignBand |
createSummary(List<FillColumn> fillColumns) |
protected JRDesignBand |
createTitle(List<FillColumn> fillColumns) |
JRBand |
getBackground() |
int |
getBottomMargin() |
int |
getColumnCount()
Gets the number of columns on each page
|
RunDirectionEnum |
getColumnDirection()
Specifies whether columns will be filled from left to right or from right to left.
|
JRBand |
getColumnFooter() |
JRBand |
getColumnHeader() |
int |
getColumnSpacing()
Specifies the space between columns on the same page.
|
int |
getColumnWidth() |
JRDataset[] |
getDatasets()
Returns the datasets of this report.
|
JRStyle |
getDefaultStyle()
Returns a default style.
|
JRBand |
getDetail()
Deprecated.
|
JRSection |
getDetailSection() |
protected JRField |
getField(String name) |
JRField[] |
getFields() |
String |
getFormatFactoryClass()
Gets the name of the class implementing the
FormatFactory
interface to use with this report. |
protected TimeZone |
getFormatTimeZone(JRTextField textField,
Class<?> valueClass) |
JRGroup[] |
getGroups() |
String[] |
getImports()
Gets an array of imports (needed if report expression require additional classes in order to compile).
|
String |
getLanguage()
Gets the report language.
|
JRBand |
getLastPageFooter() |
int |
getLeftMargin() |
JRDataset |
getMainDataset()
Returns the main report dataset.
|
String |
getName()
Gets the report name.
|
JRBand |
getNoData() |
OrientationEnum |
getOrientationValue()
Specifies whether document pages will be rendered in a portrait or landscape layout.
|
JRBand |
getPageFooter() |
JRBand |
getPageHeader() |
int |
getPageHeight() |
int |
getPageWidth() |
JRParameter[] |
getParameters() |
JRPropertiesHolder |
getParentProperties()
Returns the parent properties holder, whose properties are used as defaults
for this object.
|
PrintOrderEnum |
getPrintOrderValue()
Specifies whether columns will be filled horizontally or vertically.
|
JRPropertiesMap |
getPropertiesMap()
Returns this object's properties map.
|
String |
getProperty(String name)
Gets a property value
|
String[] |
getPropertyNames()
Gets an array of report properties names.
|
JRQuery |
getQuery() |
String |
getResourceBundle()
Gets the base name of the report associated resource bundle.
|
int |
getRightMargin() |
String |
getScriptletClass() |
JRScriptlet[] |
getScriptlets() |
SectionTypeEnum |
getSectionType()
Specifies whether report sections are made of bands or of parts.
|
JRSortField[] |
getSortFields() |
StyleResolver |
getStyleResolver()
Returns a style resolver.
|
JRStyle[] |
getStyles()
Gets an array of report styles.
|
JRBand |
getSummary() |
JRReportTemplate[] |
getTemplates()
Returns the list of report templates.
|
JRBand |
getTitle() |
int |
getTopMargin() |
UUID |
getUUID() |
protected JRVariable |
getVariable(String name) |
JRVariable[] |
getVariables() |
WhenNoDataTypeEnum |
getWhenNoDataTypeValue()
Specifies the report behavior in case of empty datasources.
|
WhenResourceMissingTypeEnum |
getWhenResourceMissingTypeValue()
Returns the resource missing handling type.
|
boolean |
hasProperties()
Checks whether the object has any properties.
|
boolean |
isFloatColumnFooter()
Specifies if the column footer section will be printed at the bottom of the column or if it
will immediately follow the last detail or group footer printed on the current column.
|
protected boolean |
isGeneratePdfTags() |
boolean |
isIgnorePagination()
Decides whether to use pagination when filling the report.
|
boolean |
isSummaryNewPage()
Specifies if the summary section will be printed on a separate last page.
|
boolean |
isSummaryWithPageHeaderAndFooter()
Specifies if the summary section will be accompanied by the page header and footer.
|
boolean |
isTitleNewPage()
Specifies if the title section will be printed on a separate initial page.
|
void |
removeProperty(String name) |
protected void |
scaleCellElement(JRElement element,
Integer cellWidth,
int scaledCellWidth) |
void |
setProperty(String name,
String value) |
void |
setTableInstanceIndex(int instanceIndex) |
void |
setWhenNoDataType(WhenNoDataTypeEnum whenNoDataType)
Sets the report behavior in case of empty datasources.
|
void |
setWhenResourceMissingType(WhenResourceMissingTypeEnum whenResourceMissingType)
Sets the resource missing handling type.
|
protected JRSection |
wrapBand(JRBand band,
JROrigin origin) |
public static final String EXCEPTION_MESSAGE_KEY_UNKNOWN_CHILD_TYPE
public static final String EXCEPTION_MESSAGE_KEY_FIELD_NOT_FOUND
public static final String EXCEPTION_MESSAGE_KEY_VARIABLE_NOT_FOUND
public static final String EXCEPTION_MESSAGE_KEY_UNRECOGNIZED_FILTER_EXPRESSION_TYPE
public static final String PROPERTY_UP_ARROW_CHAR
public static final String PROPERTY_DOWN_ARROW_CHAR
public static final String PROPERTY_ICON_FONT
public static final String PROPERTY_INTERACTIVE_TABLE
The property can be set:
The default global value of this property is true
public static final String PROPERTY_GENERATE_TABLE_PDF_TAGS
The property can be set:
The default global value of this property is false
public static final String PROPERTY_COLUMN_FIELD
public static final String PROPERTY_COLUMN_VARIABLE
public static final String PROPERTY_COLUMN_SORTABLE
It defaults to true
public static final String PROPERTY_COLUMN_FILTERABLE
It defaults to true
public static final String PROPERTY_COLUMN_CONDITIONALLY_FORMATTABLE
It defaults to true
protected static final String SUMMARY_GROUP_NAME
protected static final String HTML_CLASS_CELL_PREFIX
protected static final String HTML_CLASS_CELL
public static final String TABLE_HEADER_LABEL_MATCHER_EXPORT_KEY
public static final String TABLE_HEADER_ICON_LABEL_MATCHER_EXPORT_KEY
protected static final String TABLE_SCRIPTLET_NAME
public TableReport(FillContext fillContext, TableComponent table, TableReportDataset mainDataset, List<FillColumn> fillColumns, BuiltinExpressionEvaluatorFactory builtinEvaluatorFactory)
protected JRBand createDetailBand(List<FillColumn> fillColumns)
protected TimeZone getFormatTimeZone(JRTextField textField, Class<?> valueClass)
protected JRDesignBand createColumnHeader(List<FillColumn> fillColumns)
protected JRDesignBand createPageFooter(List<FillColumn> fillColumns)
protected JRDesignBand createTitle(List<FillColumn> fillColumns)
protected JRDesignBand createSummary(List<FillColumn> fillColumns)
protected JRBand createGroupHeader(String groupName, List<FillColumn> fillColumns)
protected JRBand createGroupFooter(String groupName, List<FillColumn> fillColumns)
protected boolean isGeneratePdfTags()
protected int computeTableWidth(List<FillColumn> fillColumns)
protected void addSummaryGroup(List<FillColumn> fillColumns)
protected JRElement createCell(JRElementGroup parentGroup, Cell cell, int originalWidth, int width, int x, int y, Integer columnHashCode, boolean forceFrame)
protected JRElement createCellElement(JRElementGroup elementGroup, Cell cell, int originalWidth, int width, int x, int y, Integer columnHashCode)
protected void scaleCellElement(JRElement element, Integer cellWidth, int scaledCellWidth)
public JRBand getBackground()
getBackground
in interface JRReport
public int getBottomMargin()
getBottomMargin
in interface JRReport
public int getColumnCount()
JRReport
getColumnCount
in interface JRReport
public JRBand getColumnFooter()
getColumnFooter
in interface JRReport
public JRBand getColumnHeader()
getColumnHeader
in interface JRReport
public int getColumnSpacing()
JRReport
getColumnSpacing
in interface JRReport
public int getColumnWidth()
getColumnWidth
in interface JRReport
public JRDataset[] getDatasets()
JRReport
getDatasets
in interface JRReport
@Deprecated public JRBand getDetail()
public JRSection getDetailSection()
getDetailSection
in interface JRReport
public String getFormatFactoryClass()
JRReport
FormatFactory
interface to use with this report.getFormatFactoryClass
in interface JRReport
public String[] getImports()
JRReport
getImports
in interface JRReport
public String getLanguage()
JRReport
getLanguage
in interface JRReport
public JRBand getLastPageFooter()
getLastPageFooter
in interface JRReport
public int getLeftMargin()
getLeftMargin
in interface JRReport
public JRDataset getMainDataset()
JRReport
The main report dataset consists of all parameters, fields, variables and groups of the report.
getMainDataset
in interface JRReport
public OrientationEnum getOrientationValue()
JRReport
getOrientationValue
in interface JRReport
OrientationEnum
public JRBand getPageFooter()
getPageFooter
in interface JRReport
public JRBand getPageHeader()
getPageHeader
in interface JRReport
public int getPageHeight()
getPageHeight
in interface JRReport
public int getPageWidth()
getPageWidth
in interface JRReport
public JRParameter[] getParameters()
getParameters
in interface JRReport
public PrintOrderEnum getPrintOrderValue()
JRReport
getPrintOrderValue
in interface JRReport
PrintOrderEnum
public RunDirectionEnum getColumnDirection()
JRReport
getColumnDirection
in interface JRReport
RunDirectionEnum
public String getProperty(String name)
JRReport
getProperty
in interface JRReport
name
- the property namepublic String[] getPropertyNames()
JRReport
getPropertyNames
in interface JRReport
public String getResourceBundle()
JRReport
getResourceBundle
in interface JRReport
public int getRightMargin()
getRightMargin
in interface JRReport
public String getScriptletClass()
getScriptletClass
in interface JRReport
public JRScriptlet[] getScriptlets()
getScriptlets
in interface JRReport
public JRSortField[] getSortFields()
getSortFields
in interface JRReport
public JRStyle[] getStyles()
JRReport
public JRBand getSummary()
getSummary
in interface JRReport
public JRReportTemplate[] getTemplates()
JRReport
template
.
Templates include styles which can be used in the report.
The order in which the templates are included in the report is important:
getTemplates
in interface JRReport
null
if noneJRTemplate
,
JRParameter.REPORT_TEMPLATES
public int getTopMargin()
getTopMargin
in interface JRReport
public JRVariable[] getVariables()
getVariables
in interface JRReport
protected JRVariable getVariable(String name)
public WhenNoDataTypeEnum getWhenNoDataTypeValue()
JRReport
getWhenNoDataTypeValue
in interface JRReport
public SectionTypeEnum getSectionType()
JRReport
getSectionType
in interface JRReport
SectionTypeEnum
public WhenResourceMissingTypeEnum getWhenResourceMissingTypeValue()
JRReport
getWhenResourceMissingTypeValue
in interface JRReport
public boolean isFloatColumnFooter()
JRReport
isFloatColumnFooter
in interface JRReport
public boolean isIgnorePagination()
JRReport
If set to true
the report will be generated on one long page.
The design attribute can be overridden at fill time by the IS_IGNORE_PAGINATION
parameter.
isIgnorePagination
in interface JRReport
public boolean isSummaryNewPage()
JRReport
isSummaryNewPage
in interface JRReport
public boolean isSummaryWithPageHeaderAndFooter()
JRReport
isSummaryWithPageHeaderAndFooter
in interface JRReport
public boolean isTitleNewPage()
JRReport
isTitleNewPage
in interface JRReport
public void removeProperty(String name)
removeProperty
in interface JRReport
public void setProperty(String name, String value)
setProperty
in interface JRReport
public void setWhenNoDataType(WhenNoDataTypeEnum whenNoDataType)
JRReport
setWhenNoDataType
in interface JRReport
public void setWhenResourceMissingType(WhenResourceMissingTypeEnum whenResourceMissingType)
JRReport
setWhenResourceMissingType
in interface JRReport
whenResourceMissingType
- the resource missing handling typepublic JRStyle getDefaultStyle()
JRDefaultStyleProvider
getDefaultStyle
in interface JRDefaultStyleProvider
public StyleResolver getStyleResolver()
JRDefaultStyleProvider
getStyleResolver
in interface JRDefaultStyleProvider
public JRPropertiesHolder getParentProperties()
JRPropertiesHolder
getParentProperties
in interface JRPropertiesHolder
null
if no parentpublic JRPropertiesMap getPropertiesMap()
JRPropertiesHolder
getPropertiesMap
in interface JRPropertiesHolder
public boolean hasProperties()
JRPropertiesHolder
hasProperties
in interface JRPropertiesHolder
public UUID getUUID()
getUUID
in interface JRIdentifiable
public void setTableInstanceIndex(int instanceIndex)
Copyright © 2017. All rights reserved.