Class Region

All Implemented Interfaces:
NodeParser, com.inet.report.ReferenceHolder, Serializable
Direct Known Subclasses:
Area, Section

public abstract class Region extends ReportComponent
The Region class is the super class of Area and Section. It describes a logical region in the report.
Since:
10.0
See Also:
  • Field Details

    • REPORT_HEADER

      public static final int REPORT_HEADER
      Identifier for report header area or section.
      See Also:
    • GROUP_HEADER

      public static final int GROUP_HEADER
      Identifier for group header area or section.
      See Also:
    • DETAIL

      public static final int DETAIL
      Identifier for detail area or section.
      See Also:
  • Method Details

    • setNewPageBefore

      public void setNewPageBefore(boolean newValue)
      Sets the value of the property 'new page before'. This property is not available for Page and Report Footer and Header Sections. If it's enabled a page break will be inserted before this Section is printed. If you use it in a Detail Section, then before each record a page break will be inserted. Page Header and Footer will appear on each page.
      Parameters:
      newValue - The new value of the property 'new page before'.
      Since:
      10.0
    • isNewPageBefore

      public boolean isNewPageBefore()
      Returns the value of the property 'new page before'. This property is not available for Page and Report Footer and Header Sections. If it's enabled a page break will be inserted before this Section is printed. If you use it in a Detail Section, then before each record a page break will be inserted. Page Header and Footer will appear on each page.
      Returns:
      The current value of the property 'new page before'.
      Since:
      7.0
    • setNewPageBeforeFormula

      public void setNewPageBeforeFormula(FormulaField newFormula)
      Sets the formula for the property 'new page before'. This property is not available for Page and Report Footer and Header Sections. If it's enabled a page break will be inserted before this Section is printed. If you use it in a Detail Section, then before each record a page break will be inserted. Page Header and Footer will appear on each page.
      Parameters:
      newFormula - The new formula for the property 'new page before'.
      Since:
      10.0
    • getNewPageBeforeFormula

      public FormulaField getNewPageBeforeFormula()
      Returns the formula for the property 'new page before'. This property is not available for Page and Report Footer and Header Sections. If it's enabled a page break will be inserted before this Section is printed. If you use it in a Detail Section, then before each record a page break will be inserted. Page Header and Footer will appear on each page.
      Returns:
      FormulaField The formula for the property 'new page before'.
      Since:
      10.0
    • setNewPageAfter

      public void setNewPageAfter(boolean newValue)
      Sets the value of the property 'new page after'. If this property is enabled after printing the Section a page break will be inserted. Usefull if you want a single page for each group. The page header and footer will be printed on each page.
      Parameters:
      newValue - The new value of the property 'new page after'.
      Since:
      10.0
    • isNewPageAfter

      public boolean isNewPageAfter()
      Returns the value of the property 'new page after'. If this property is enabled after printing the Section a page break will be inserted. Usefull if you want a single page for each group. The page header and footer will be printed on each page.
      Returns:
      The current value of the property 'new page after'.
      Since:
      7.0
    • setNewPageAfterFormula

      public void setNewPageAfterFormula(FormulaField newFormula)
      Sets the formula for the property 'new page after'. If this property is enabled after printing the Section a page break will be inserted. Usefull if you want a single page for each group. The page header and footer will be printed on each page.
      Parameters:
      newFormula - The new formula for the property 'new page after'.
      Since:
      10.0
    • getNewPageAfterFormula

      public FormulaField getNewPageAfterFormula()
      Returns the formula for the property 'new page after'. If this property is enabled after printing the Section a page break will be inserted. Usefull if you want a single page for each group. The page header and footer will be printed on each page.
      Returns:
      FormulaField The formula for the property 'new page after'.
      Since:
      10.0
    • isAtBottomOfPage

      public boolean isAtBottomOfPage()
      Gets the 'print at bottom of page' property. If this property is set each element in group will be printed at bottom of page only.
      Returns:
      The current value of the 'print at bottom of page' property.
      Since:
      7.0
    • setAtBottomOfPage

      public void setAtBottomOfPage(boolean atBottomOfPage)
      Sets the 'print at bottom of page' property. If this property is set each element in group will be printed at bottom of page only.
      Parameters:
      atBottomOfPage - The value of the property 'print at bottom of page.
      Since:
      10.0
    • setAtBottomOfPageFormula

      public void setAtBottomOfPageFormula(FormulaField newFormula)
      Sets the formula for the property 'print at bottom of page'. If this property is set each element in group will be printed at bottom of page only.
      Parameters:
      newFormula - The new formula for the property 'print at bottom of page'.
      Since:
      10.0
    • getAtBottomOfPageFormula

      public FormulaField getAtBottomOfPageFormula()
      Gets the formula for the property 'print at bottom of page'. If this property is set each element in group will be printed at bottom of page only.
      Returns:
      The current formula for the property 'print at bottom of page'.
      Since:
      10.0
    • isResetPageNumber

      public boolean isResetPageNumber()
      Gets the 'reset page number' property. If this property is enabled the page number of the next page will reset to 1 after each group.
      Returns:
      The current value of the 'reset page number' property.
      Since:
      7.0
    • setResetPageNumber

      public void setResetPageNumber(boolean resetPageNumber)
      Sets the 'reset page number' property. If this property is enabled the page number of the next page will reset to 1 after each group.
      Parameters:
      resetPageNumber - The value of the property 'reset page number'.
      Since:
      10.0
    • setResetPageNumberFormula

      public void setResetPageNumberFormula(FormulaField newFormula)
      Sets the formula for the property 'reset page number'. If this property is enabled the page number of the next page will reset to 1 after each group.
      Parameters:
      newFormula - The new formula for the property 'reset page number'.
      Since:
      10.0
    • getResetPageNumberFormula

      public FormulaField getResetPageNumberFormula()
      Gets the formula for the property 'reset page number'. If this property is enabled the page number of the next page will reset to 1 after each group.
      Returns:
      The current formula for the property 'reset page number'.
      Since:
      10.0
    • setSuppressOnDrillDown

      public void setSuppressOnDrillDown(boolean newValue)
      Sets the value of the property 'suppressOnDrillDown'. Set this property if you want the Section to be suppress in drill-down only.
      Parameters:
      newValue - The new value of the property 'drillDown'.
      Since:
      10.0
    • isSuppressOnDrillDown

      public boolean isSuppressOnDrillDown()
      Returns the value of the property 'drillDown'. Use this property if you want the Section to be suppress in drill-down only.
      Returns:
      The value of the property 'drillDown'
      Since:
      7.0
    • setSuppressOnDrillDownFormula

      public void setSuppressOnDrillDownFormula(FormulaField newFormula)
      Sets the value of the formula 'suppressOnDrillDown'. Set this property if you want the Section to be suppress in drill-down only.
      Parameters:
      newFormula - The new value of the formula 'drillDown'.
      Since:
      10.0
    • getSuppressOnDrillDownFormula

      public FormulaField getSuppressOnDrillDownFormula()
      Returns the formula for 'suppressOnDrillDown'.
      Returns:
      FormulaField The formula for the 'suppressOnDrillDown'.
      Since:
      10.0
      See Also:
    • getType

      public int getType()
      Returns the value of the property 'type'. The type specifies whether a area or a Section is a report header, report footer, page header, page footer, group header, group footer or detail. If no information about the type of an area is known, -1 is returned.
      Overrides:
      getType in class ReportComponent
      Returns:
      The value of the property 'type'.
      Since:
      10.0
      See Also:
    • getPropertyFormulas

      public List<FormulaField> getPropertyFormulas()
      Returns a list with all property formulas that are set for this report element. This includes property formulas for any type of sub-component but excludes formulas for any descendant ReportComponent of this one. To get the property formulas for descendant ReportComponent use ReportComponent.getSubComponents()
      Overrides:
      getPropertyFormulas in class ReportComponent
      Returns:
      List of property formulas
      Since:
      6.0
    • getTypeAsString

      public String getTypeAsString()
      FOR INTERNAL USE ONLY
      Returns:
      the area type as string.
      Since:
      6.1
    • isHeader

      public boolean isHeader()
      Return whether this Area is a header area or not.
      Returns:
      true if this area is a header area, else false.
      Since:
      10.0
    • parseElement

      public NodeParser parseElement(com.inet.report.parser.XMLTag group, String tag, Attributes atts, Map<String,Object> parserMap) throws FatalParserException
      FOR INTERNAL USE ONLY FOR INTERNAL USE ONLY Internal method for reading report XML

      Parses an XML node with the given information, and returns either a sub-element which was created as a result, or null if no sub-element was created, i.e. the information was applied to the ReportComponent itself. Note that the parsing is highly tolerant, i.e. exceptions are intercepted and suppressed if at all possible.

      Specified by:
      parseElement in interface NodeParser
      Overrides:
      parseElement in class ReportComponent
      Parameters:
      group - XMLTag of the current node to be parsed, or null if there is no such current group. An XMLTag is a group of nodes bundled together, usually it is a Properties node such as CommonProperties, BorderProperties, etc.
      tag - The XMLTag to be parsed
      atts - The set of attributes in the current XMLTag
      parserMap - The map of current Parser.
      Returns:
      The NodeParser sub-element if one needed to be created, or null if none was created.
      Throws:
      FatalParserException - if an exception occurs which causes the report to not be able to be read: causes the abortion of the reading of the report.