Class JRBaseReport

    • Field Detail

      • PROPERTY_WHEN_NO_DATA_TYPE

        public static final java.lang.String PROPERTY_WHEN_NO_DATA_TYPE
        See Also:
        Constant Field Values
      • PROPERTY_SECTION_TYPE

        public static final java.lang.String PROPERTY_SECTION_TYPE
        See Also:
        Constant Field Values
      • name

        protected java.lang.String name
      • language

        protected java.lang.String language
      • columnCount

        protected int columnCount
      • pageWidth

        protected int pageWidth
      • pageHeight

        protected int pageHeight
      • columnWidth

        protected int columnWidth
      • columnSpacing

        protected int columnSpacing
      • leftMargin

        protected int leftMargin
      • rightMargin

        protected int rightMargin
      • topMargin

        protected int topMargin
      • bottomMargin

        protected int bottomMargin
      • isTitleNewPage

        protected boolean isTitleNewPage
      • isSummaryNewPage

        protected boolean isSummaryNewPage
      • isSummaryWithPageHeaderAndFooter

        protected boolean isSummaryWithPageHeaderAndFooter
      • isFloatColumnFooter

        protected boolean isFloatColumnFooter
      • ignorePagination

        protected boolean ignorePagination
      • formatFactoryClass

        protected java.lang.String formatFactoryClass
      • importsSet

        protected java.util.Set<java.lang.String> importsSet
      • defaultStyle

        protected JRStyle defaultStyle
      • styles

        protected JRStyle[] styles
      • mainDataset

        protected JRDataset mainDataset
        The main dataset of the report.
      • datasets

        protected JRDataset[] datasets
        Sub datasets of the report.
      • background

        protected JRBand background
      • title

        protected JRBand title
      • pageHeader

        protected JRBand pageHeader
      • columnHeader

        protected JRBand columnHeader
      • detailSection

        protected JRSection detailSection
      • columnFooter

        protected JRBand columnFooter
      • pageFooter

        protected JRBand pageFooter
      • lastPageFooter

        protected JRBand lastPageFooter
      • summary

        protected JRBand summary
      • noData

        protected JRBand noData
    • Method Detail

      • setJasperReportsContext

        public void setJasperReportsContext​(JasperReportsContext jasperReportsContext)
      • getName

        public java.lang.String getName()
        Description copied from interface: JRReport
        Gets the report name.
        Specified by:
        getName 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
      • getColumnCount

        public int getColumnCount()
        Description copied from interface: JRReport
        Gets the number of columns on each page
        Specified by:
        getColumnCount in interface JRReport
      • 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
      • 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
      • 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
      • setSectionType

        public void setSectionType​(SectionTypeEnum sectionType)
      • getColumnSpacing

        public int getColumnSpacing()
        Description copied from interface: JRReport
        Specifies the space between columns on the same page.
        Specified by:
        getColumnSpacing 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
      • 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
      • 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
      • 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
      • 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
      • getPropertyNames

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

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

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

        public void removeProperty​(java.lang.String propName)
        Specified by:
        removeProperty in interface JRReport
      • 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
      • 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
      • getStyles

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

        public JRScriptlet[] getScriptlets()
        Gets an array of report scriptlets (excluding the scriptletClass one).
        Specified by:
        getScriptlets in interface JRReport
      • getParameters

        public JRParameter[] getParameters()
        Gets an array of report parameters (including built-in ones).
        Specified by:
        getParameters in interface JRReport
      • getFields

        public JRField[] getFields()
        Gets an array of report fields.
        Specified by:
        getFields 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
      • 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
      • 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
      • 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
      • 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
      • 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
      • getAllBands

        public JRBand[] getAllBands()