Class TableReport

    • Field Detail

      • EXCEPTION_MESSAGE_KEY_UNKNOWN_CHILD_TYPE

        public static final java.lang.String EXCEPTION_MESSAGE_KEY_UNKNOWN_CHILD_TYPE
        See Also:
        Constant Field Values
      • EXCEPTION_MESSAGE_KEY_FIELD_NOT_FOUND

        public static final java.lang.String EXCEPTION_MESSAGE_KEY_FIELD_NOT_FOUND
        See Also:
        Constant Field Values
      • EXCEPTION_MESSAGE_KEY_VARIABLE_NOT_FOUND

        public static final java.lang.String EXCEPTION_MESSAGE_KEY_VARIABLE_NOT_FOUND
        See Also:
        Constant Field Values
      • EXCEPTION_MESSAGE_KEY_UNRECOGNIZED_FILTER_EXPRESSION_TYPE

        public static final java.lang.String EXCEPTION_MESSAGE_KEY_UNRECOGNIZED_FILTER_EXPRESSION_TYPE
        See Also:
        Constant Field Values
      • METADATA_KEY_QUALIFICATION

        public static final java.lang.String METADATA_KEY_QUALIFICATION
        See Also:
        Constant Field Values
      • PROPERTY_UP_ARROW_CHAR

        public static final java.lang.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
        See Also:
        Constant Field Values
      • PROPERTY_DOWN_ARROW_CHAR

        public static final java.lang.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
        See Also:
        Constant Field Values
      • PROPERTY_FILTER_CHAR

        public static final java.lang.String PROPERTY_FILTER_CHAR
        Global property that specifies the character to be used on the column header when the tables's column has a filtered applied
        See Also:
        Constant Field Values
      • PROPERTY_ICON_FONT

        public static final java.lang.String PROPERTY_ICON_FONT
        Global property that specifies the font to be used for the icons on the column header
        See Also:
        Constant Field Values
      • PROPERTY_INTERACTIVE_TABLE

        public static final java.lang.String PROPERTY_INTERACTIVE_TABLE
        Property that enables/disables the interactivity in the table component

        The property can be set:

        • globally
        • at report level
        • at component level
        • at column level

        The default global value of this property is true

        See Also:
        Constant Field Values
      • PROPERTY_FLOATING_HEADER

        public static final java.lang.String PROPERTY_FLOATING_HEADER
        Property that enables/disables the floating header in the table component when scrolling. If the interactivity has been disabled by setting PROPERTY_INTERACTIVE_TABLE to false, then setting this property will have no effect.

        It can be set:

        • globally
        • at report level
        • at component level

        The default global value of this property is true

        See Also:
        Constant Field Values
      • PROPERTY_GENERATE_TABLE_PDF_TAGS

        public static final java.lang.String PROPERTY_GENERATE_TABLE_PDF_TAGS
        Deprecated.
        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

        The property can be set:

        • globally
        • at report level
        • at component level

        The default global value of this property is false

        See Also:
        Constant Field Values
      • PROPERTY_ACCESSIBLE_TABLE

        public static final java.lang.String PROPERTY_ACCESSIBLE_TABLE
        Property that enables/disables the automatic addition of specific custom properties to the elements that make up the table and its cells. These properties would be then used to produce special document accessibility metadata during exports.

        The property can be set:

        • globally
        • at report level
        • at component level
        See Also:
        Constant Field Values
      • PROPERTY_COLUMN_FIELD

        public static final java.lang.String PROPERTY_COLUMN_FIELD
        Column property that specifies the field to be used for sorting, filtering and conditional formatting
        See Also:
        Constant Field Values
      • PROPERTY_COLUMN_VARIABLE

        public static final java.lang.String PROPERTY_COLUMN_VARIABLE
        Column property that specifies the variable to be used for sorting, filtering and conditional formatting
        See Also:
        Constant Field Values
      • PROPERTY_COLUMN_SORTABLE

        public static final java.lang.String PROPERTY_COLUMN_SORTABLE
        Column property that enables/disables sorting

        It defaults to true

        See Also:
        Constant Field Values
      • PROPERTY_COLUMN_FILTERABLE

        public static final java.lang.String PROPERTY_COLUMN_FILTERABLE
        Column property that enables/disables filtering

        It defaults to true

        See Also:
        Constant Field Values
      • PROPERTY_TABLE_NAME

        public static final java.lang.String PROPERTY_TABLE_NAME
        Property that provides a name for table.

        The name is used as report name in element origins.

        See Also:
        JROrigin.getReportName(), Constant Field Values
      • SUMMARY_GROUP_NAME

        protected static final java.lang.String SUMMARY_GROUP_NAME
        See Also:
        Constant Field Values
      • HTML_CLASS_CELL_PREFIX

        protected static final java.lang.String HTML_CLASS_CELL_PREFIX
        See Also:
        Constant Field Values
      • HTML_CLASS_CELL

        protected static final java.lang.String HTML_CLASS_CELL
        See Also:
        Constant Field Values
      • TABLE_HEADER_LABEL_MATCHER_EXPORT_KEY

        public static final java.lang.String TABLE_HEADER_LABEL_MATCHER_EXPORT_KEY
        See Also:
        Constant Field Values
      • TABLE_HEADER_ICON_LABEL_MATCHER_EXPORT_KEY

        public static final java.lang.String TABLE_HEADER_ICON_LABEL_MATCHER_EXPORT_KEY
        See Also:
        Constant Field Values
      • TABLE_SCRIPTLET_NAME

        protected static final java.lang.String TABLE_SCRIPTLET_NAME
        See Also:
        Constant Field Values
    • Method Detail

      • createDetailBand

        protected JRBand createDetailBand​(java.util.List<FillColumn> fillColumns)
      • getFormatTimeZone

        protected java.util.TimeZone getFormatTimeZone​(JRTextField textField,
                                                       java.lang.Class<?> valueClass)
      • createGroupHeader

        protected JRBand createGroupHeader​(java.lang.String groupName,
                                           java.util.List<FillColumn> fillColumns)
      • createGroupFooter

        protected JRBand createGroupFooter​(java.lang.String groupName,
                                           java.util.List<FillColumn> fillColumns)
      • isAccessibleTable

        protected boolean isAccessibleTable()
      • computeTableWidth

        protected int computeTableWidth​(java.util.List<FillColumn> fillColumns)
      • addSummaryGroup

        protected void addSummaryGroup​(java.util.List<FillColumn> fillColumns)
      • createCell

        protected JRElement createCell​(JRElementGroup parentGroup,
                                       BaseCell cell,
                                       int originalWidth,
                                       int width,
                                       int x,
                                       int y,
                                       java.lang.Integer columnHashCode,
                                       java.util.UUID uuid,
                                       boolean forceFrame)
      • createCellElement

        protected JRElement createCellElement​(JRElementGroup elementGroup,
                                              BaseCell cell,
                                              int originalWidth,
                                              int width,
                                              int x,
                                              int y,
                                              java.lang.Integer columnHashCode)
      • scaleCellElement

        protected void scaleCellElement​(JRElement element,
                                        java.lang.Integer cellWidth,
                                        int scaledCellWidth)
      • getColumnCount

        public int getColumnCount()
        Description copied from interface: JRReport
        Gets the number of columns on each page
        Specified by:
        getColumnCount in interface JRReport
      • getColumnSpacing

        public int getColumnSpacing()
        Description copied from interface: JRReport
        Specifies the space between columns on the same page.
        Specified by:
        getColumnSpacing in interface JRReport
      • getDatasets

        public JRDataset[] getDatasets()
        Description copied from interface: JRReport
        Returns the datasets of this report.
        Specified by:
        getDatasets in interface JRReport
        Returns:
        the datasets of this report
      • getDetail

        @Deprecated
        public JRBand getDetail()
        Deprecated.
      • getField

        protected JRField getField​(java.lang.String name)
      • getFormatFactoryClass

        public java.lang.String getFormatFactoryClass()
        Description copied from interface: JRReport
        Gets the name of the class implementing the FormatFactory interface to use with this report.
        Specified by:
        getFormatFactoryClass in interface JRReport
      • getImports

        public java.lang.String[] getImports()
        Description copied from interface: JRReport
        Gets an array of imports (needed if report expression require additional classes in order to compile).
        Specified by:
        getImports in interface JRReport
      • getLanguage

        public java.lang.String getLanguage()
        Description copied from interface: JRReport
        Gets the report language. Should be Java or Groovy.
        Specified by:
        getLanguage in interface JRReport
      • getMainDataset

        public JRDataset getMainDataset()
        Description copied from interface: JRReport
        Returns the main report dataset.

        The main report dataset consists of all parameters, fields, variables and groups of the report.

        Specified by:
        getMainDataset in interface JRReport
        Returns:
        the main report dataset
      • getName

        public java.lang.String getName()
        Description copied from interface: JRReport
        Gets the report name.
        Specified by:
        getName in interface JRReport
      • getOrientationValue

        public OrientationEnum getOrientationValue()
        Description copied from interface: JRReport
        Specifies whether document pages will be rendered in a portrait or landscape layout.
        Specified by:
        getOrientationValue in interface JRReport
        Returns:
        a value representing one of the orientation constants in OrientationEnum
      • getPrintOrderValue

        public PrintOrderEnum getPrintOrderValue()
        Description copied from interface: JRReport
        Specifies whether columns will be filled horizontally or vertically.
        Specified by:
        getPrintOrderValue in interface JRReport
        Returns:
        a value representing one of the print order constants in PrintOrderEnum
      • getColumnDirection

        public RunDirectionEnum getColumnDirection()
        Description copied from interface: JRReport
        Specifies whether columns will be filled from left to right or from right to left.
        Specified by:
        getColumnDirection in interface JRReport
        Returns:
        a value representing one of the column direction constants in RunDirectionEnum
      • getProperty

        public java.lang.String getProperty​(java.lang.String name)
        Description copied from interface: JRReport
        Gets a property value
        Specified by:
        getProperty in interface JRReport
        Parameters:
        name - the property name
      • getPropertyNames

        public java.lang.String[] getPropertyNames()
        Description copied from interface: JRReport
        Gets an array of report properties names.
        Specified by:
        getPropertyNames in interface JRReport
      • getResourceBundle

        public java.lang.String getResourceBundle()
        Description copied from interface: JRReport
        Gets the base name of the report associated resource bundle.
        Specified by:
        getResourceBundle in interface JRReport
      • getStyles

        public JRStyle[] getStyles()
        Description copied from interface: JRReport
        Gets an array of report styles.
        Specified by:
        getStyles in interface JRReport
      • getTemplates

        public JRReportTemplate[] getTemplates()
        Description copied from interface: JRReport
        Returns the list of report templates.

        A report template is an expression which resolves at runtime to a template. Templates include styles which can be used in the report.

        The order in which the templates are included in the report is important:

        • A style's parent must appear before the style itself.
        • A style overrides styles with the same name that are placed before it. Also, report styles override templates styles with the same name.
        Specified by:
        getTemplates in interface JRReport
        Returns:
        the list of report templates, or null if none
        See Also:
        JRTemplate, JRParameter.REPORT_TEMPLATES
      • getVariable

        protected JRVariable getVariable​(java.lang.String name)
      • getSectionType

        public SectionTypeEnum getSectionType()
        Description copied from interface: JRReport
        Specifies whether report sections are made of bands or of parts.
        Specified by:
        getSectionType in interface JRReport
        Returns:
        a value representing one of the section type constants in SectionTypeEnum
      • isFloatColumnFooter

        public boolean isFloatColumnFooter()
        Description copied from interface: JRReport
        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.
        Specified by:
        isFloatColumnFooter in interface JRReport
      • isIgnorePagination

        public boolean isIgnorePagination()
        Description copied from interface: JRReport
        Decides whether to use pagination when filling the report.

        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.

        Specified by:
        isIgnorePagination in interface JRReport
        Returns:
        whether to use pagination when filling the report
      • isSummaryNewPage

        public boolean isSummaryNewPage()
        Description copied from interface: JRReport
        Specifies if the summary section will be printed on a separate last page.
        Specified by:
        isSummaryNewPage in interface JRReport
      • isSummaryWithPageHeaderAndFooter

        public boolean isSummaryWithPageHeaderAndFooter()
        Description copied from interface: JRReport
        Specifies if the summary section will be accompanied by the page header and footer.
        Specified by:
        isSummaryWithPageHeaderAndFooter in interface JRReport
      • isTitleNewPage

        public boolean isTitleNewPage()
        Description copied from interface: JRReport
        Specifies if the title section will be printed on a separate initial page.
        Specified by:
        isTitleNewPage in interface JRReport
      • removeProperty

        public void removeProperty​(java.lang.String name)
        Specified by:
        removeProperty in interface JRReport
      • setProperty

        public void setProperty​(java.lang.String name,
                                java.lang.String value)
        Specified by:
        setProperty in interface JRReport
      • setWhenResourceMissingType

        public void setWhenResourceMissingType​(WhenResourceMissingTypeEnum whenResourceMissingType)
        Description copied from interface: JRReport
        Sets the resource missing handling type.
        Specified by:
        setWhenResourceMissingType in interface JRReport
        Parameters:
        whenResourceMissingType - the resource missing handling type
      • hasProperties

        public boolean hasProperties()
        Description copied from interface: JRPropertiesHolder
        Checks whether the object has any properties.
        Specified by:
        hasProperties in interface JRPropertiesHolder
        Returns:
        whether the object has any properties
      • getPropertyExpressions

        public DatasetPropertyExpression[] getPropertyExpressions()
        Description copied from interface: JRReport
        Returns the list of dynamic/expression-based properties for this report.
        Specified by:
        getPropertyExpressions in interface JRReport
        Returns:
        an array containing the expression-based properties of this report
      • isInteractiveTable

        public boolean isInteractiveTable()
      • setTableInstanceIndex

        public void setTableInstanceIndex​(int instanceIndex)