Class JRDesignSubreport

All Implemented Interfaces:
Serializable, Cloneable, JRChangeEventsSupport, JRChild, JRCloneable, JRCommonElement, JRElement, JRIdentifiable, JRPropertiesHolder, JRStyleContainer, JRSubreport, JRVisitable

public class JRDesignSubreport extends JRDesignElement implements JRSubreport
Author:
Teodor Danciu (teodord@users.sourceforge.net)
See Also:
  • Field Details

  • Constructor Details

  • Method Details

    • getMode

      public ModeEnum getMode()
      Description copied from interface: JRCommonElement
      Returns the element transparency mode. The default value depends on the type of the report element. Graphic elements like rectangles and lines are opaque by default, but the images are transparent. Both static texts and text fields are transparent by default, and so are the subreport elements.
      Specified by:
      getMode in interface JRCommonElement
      Overrides:
      getMode in class JRBaseElement
    • getParametersMapExpression

      public JRExpression getParametersMapExpression()
      Specified by:
      getParametersMapExpression in interface JRSubreport
    • setParametersMapExpression

      public void setParametersMapExpression(JRExpression parametersMapExpression)
    • getParameters

      public JRSubreportParameter[] getParameters()
      Specified by:
      getParameters in interface JRSubreport
    • getParametersMap

      public Map<String,JRSubreportParameter> getParametersMap()
    • addParameter

      public void addParameter(JRSubreportParameter subreportParameter) throws JRException
      Throws:
      JRException
    • removeParameter

      public JRSubreportParameter removeParameter(String name)
    • getConnectionExpression

      public JRExpression getConnectionExpression()
      Specified by:
      getConnectionExpression in interface JRSubreport
    • setConnectionExpression

      public void setConnectionExpression(JRExpression connectionExpression)
    • getDataSourceExpression

      public JRExpression getDataSourceExpression()
      Specified by:
      getDataSourceExpression in interface JRSubreport
    • setDataSourceExpression

      public void setDataSourceExpression(JRExpression dataSourceExpression)
    • getExpression

      public JRExpression getExpression()
      Specified by:
      getExpression in interface JRSubreport
    • setExpression

      public void setExpression(JRExpression expression)
    • collectExpressions

      public void collectExpressions(JRExpressionCollector collector)
      Specified by:
      collectExpressions in interface JRElement
    • visit

      public void visit(JRVisitor visitor)
      Specified by:
      visit in interface JRVisitable
    • addReturnValue

      public void addReturnValue(JRSubreportReturnValue returnValue)
      Adds a return value to the subreport.
      Parameters:
      returnValue - the return value to be added.
    • getReturnValues

      public JRSubreportReturnValue[] getReturnValues()
      Returns the list of values to be copied from the subreport into the master.
      Specified by:
      getReturnValues in interface JRSubreport
      Returns:
      the list of values to be copied from the subreport into the master.
    • getReturnValuesList

      public List<JRSubreportReturnValue> getReturnValuesList()
      Returns the list of values to be copied from the subreport into the master.
      Returns:
      list of JRSubreportReturnValue objects
    • removeReturnValue

      public boolean removeReturnValue(JRSubreportReturnValue returnValue)
      Removes a return value from the subreport.
      Parameters:
      returnValue - the return value to be removed
      Returns:
      true if the return value was found and removed
    • getUsingCache

      public Boolean getUsingCache()
      Description copied from interface: JRSubreport
      Indicates if the engine is loading the current subreport from cache. Implementations of this method return the actual value for the internal flag that was explicitly set on this subreport.
      Specified by:
      getUsingCache in interface JRSubreport
      Returns:
      Boolean.TRUE if the subreport should be loaded from cache, Boolean.FALSE otherwise or null in case the flag was never explicitly set on this subreport element
    • setUsingCache

      public void setUsingCache(Boolean isUsingCache)
      Description copied from interface: JRSubreport
      Specifies if the engine should be loading the current subreport from cache. If set to Boolean.TRUE, the reporting engine will try to recognize previously loaded subreports using their specified source. For example, it will recognize an subreport if the subreport source is a file name that it has already loaded, or if it is the same URL.

      If set to null, the engine will rely on some default value which depends on the type of the subreport expression. The cache is turned on by default only for subreports that have java.lang.String objects in their expressions.

      Specified by:
      setUsingCache in interface JRSubreport
    • isRunToBottom

      public Boolean isRunToBottom()
      Description copied from interface: JRSubreport
      Specifies whether the subreport element will consume the entire vertical space available on the report page.
      Specified by:
      isRunToBottom in interface JRSubreport
      Returns:
      whether the subreport element will consume the entire space down to the bottom of the page
      See Also:
    • setRunToBottom

      public void setRunToBottom(Boolean runToBottom)
      Description copied from interface: JRSubreport
      Sets the flag that Specifies whether the subreport element will consume the entire vertical space available on the report page.

      This flag should be set to true if the subreport needs to always print its column and page footers at the bottom of the report page, even when the subreport data does not stretch to the bottom.

      Note that when isFloatColumnFooter is set for the subreport, the column footers will not be printed at the bottom of the page even if this flag is set.

      Specified by:
      setRunToBottom in interface JRSubreport
      Parameters:
      runToBottom - whether the subreport element will consume the entire space down to the bottom of the page
    • getOverflowType

      public OverflowType getOverflowType()
      Specified by:
      getOverflowType in interface JRSubreport
    • setOverflowType

      public void setOverflowType(OverflowType overflowType)
      Specified by:
      setOverflowType in interface JRSubreport
    • clone

      public Object clone()
      Specified by:
      clone in interface JRCloneable
      Overrides:
      clone in class JRDesignElement