Interface WebTemplateSubtotal

  • public interface WebTemplateSubtotal
    The WebTemplateSubtotal interface represents a subtotal of a single type within the WebTemplateSubtotals collection. This interface allows the user to gather information about and turn on/off the subtotal.
    MicroStrategy Web 9.0.0
    • Method Detail

      • getType

        int getType()
        Returns the type of subtotal.
        A value from EnumDSSXMLMetricType, corresponding to the subtotal type.
      • getDefinition

        WebMetric getDefinition()
                         throws java.lang.UnsupportedOperationException
        Returns the definition of a custom subtotal. A custom subtotal is a subtotal whose type is EnumDSSXMLMetricType.DssXmlMetricSubtotal.
        The metric which the custom subtotal refers to. This will be an object of type WebMetric.
        java.lang.UnsupportedOperationException - Thrown if the subtotal is not a custom subtotal, that is, its subtotal type is not EnumDSSXMLMetricType.DssXmlMetricSubtotal.
      • isActive

        boolean isActive()
        Returns whether the subtotal is active. A subtotal is active if it is turned on for the report. The subtotal may be turned on by position, across level or grouped by template units for the report.
        Whether the subtotal is active.
      • getIndex

        int getIndex()
        Returns the index of the subtotal within the WebTemplateSubtotals collection.
        The key of the subtotal object.
      • getInstance

        WebSubtotalInstance getInstance()
        Returns the WebSubtotalInstance associated with the subtotal. The WebSubtotalInstance can then be used to get more information about how the subtotal has been defined, like whether the subtotal is set by position or by level (units) or by group by etc. If the subtotal has not been turned on, then it will return null
        A WebSubtotalInstance object that holds information about how the subtotal is active
      • createInstance

        WebSubtotalInstance createInstance​(int type)
        Creates a WebSubtotalInstance of the appropriate type and associates it to the subtotal. If the subtotal already has a subtotal instance of different type associated with it, this call will clear the original subtotal instance, create a new WebSubtotalInstance and return it. Otherwise it will just return the current subtotal instance.
        type - type of subtotal instance from EnumSubtotalInstanceType
      • deActivate

        void deActivate()
        Inactivates the WebTemplateSubtotal object. This will clear the WebSubtotalInstance associated with the subtotal and generate the appropriate delta
      • getName

        java.lang.String getName()
        Returns the name of the subtotal. Example, Average, Total etc.
        String that represents the name of the subtotal object
      • getTemplateSubtotalType

        int getTemplateSubtotalType()
        Returns the subtotal type of the subtotal. This value indicates whether a subtotal is a definition subtotal or a list subtotal. A list subtotal is a Desktop created 'Custom' subtotal. This value is from EnumDSSXMLTemplateSubtotalType
      • getSubtotalForMetric

        WebTemplateSubtotal getSubtotalForMetric​(WebMetric metric)
        Returns the subtotal set for a given metric. Mainly used for 'List Subtotals' or 'Custom subtotals' where you can define the subtotal function (average, sum, minimum etc) to be used for each metric on the template. For a 'definition' subtotal, this method will return itself.
        metric - Metric whose subtotal is required.
        WebTemplateSubtotal used to define the subtotal for the given metric