Class ReportTransformHelper


  • public class ReportTransformHelper
    extends java.lang.Object
    ReportTransformHelper Provides utility functions used in various report transforms.
    Since:
    MicroStrategy Web 7.3.1 or earlier
    • Field Detail

      • MAX_CACHED_OBJECTS

        public static final int MAX_CACHED_OBJECTS
        The max number of cached objects in transform context for report transforms.
        The cached objects are stored in a hash table.
        See Also:
        Constant Field Values
      • CACHED_URL_TYPICAL_BEAN_STATES

        public static final java.lang.String CACHED_URL_TYPICAL_BEAN_STATES
        The key for cached object representing the url string for typical bean states.
        Since:
        MicroStrategy Web 8.0.0
        See Also:
        Constant Field Values
      • CACHED_DRILL_EVENT

        public static final java.lang.String CACHED_DRILL_EVENT
        The key for cached object representing the drill event for the report.
        See Also:
        Constant Field Values
      • CACHED_IMAGE_FOLDER

        public static final java.lang.String CACHED_IMAGE_FOLDER
        The key for cached object representing the image folder.
        See Also:
        Constant Field Values
      • CACHED_ADVANCED_DRILL_EVENT

        public static final java.lang.String CACHED_ADVANCED_DRILL_EVENT
        The key for cached object representing the advanced drill event for the report.
        See Also:
        Constant Field Values
      • CACHED_DRILL_EDITOR_PROCESS_EVENT

        public static final java.lang.String CACHED_DRILL_EDITOR_PROCESS_EVENT
        The key for cached object representing the drill editor's processing event.
        See Also:
        Constant Field Values
      • CACHED_ADVANCED_DRILL_EDITOR_PROCESS_EVENT

        public static final java.lang.String CACHED_ADVANCED_DRILL_EDITOR_PROCESS_EVENT
        The key for cached object representing the advanced drill editor's processing event.
        See Also:
        Constant Field Values
      • CACHED_DRILL_FILTERONSELECTION_PROCESS_EVENT

        public static final java.lang.String CACHED_DRILL_FILTERONSELECTION_PROCESS_EVENT
        The key for cached object representing the drill editor's processing event for filter on selections case.
        See Also:
        Constant Field Values
      • CACHED_SORT_EVENT

        public static final java.lang.String CACHED_SORT_EVENT
        The key for cached object representing the sort event.
        See Also:
        Constant Field Values
      • CACHED_APPLIED_SORT_ARRAY

        public static final java.lang.String CACHED_APPLIED_SORT_ARRAY
        The key for cached object representing the sort array used in grid transforms.
        See Also:
        Constant Field Values
      • CACHED_DRILL_EDITOR_NAME

        public static final java.lang.String CACHED_DRILL_EDITOR_NAME
        The key for cached object representing the drill editor's name.
        See Also:
        Constant Field Values
      • CACHED_SORT_SUBTOTAL_POSITION

        public static final java.lang.String CACHED_SORT_SUBTOTAL_POSITION
        The key for cached object representing the position for subtotal sorting.
        See Also:
        Constant Field Values
      • CACHED_IFRAME_REQUEST

        public static final java.lang.String CACHED_IFRAME_REQUEST
        The key for cached object representing whether it's a iframe request.
        See Also:
        Constant Field Values
      • CACHED_DRILL_FILTER_PAGEBY

        public static final java.lang.String CACHED_DRILL_FILTER_PAGEBY
        The key for cached object representing whether to filter on the page by elements when drilling.
        See Also:
        Constant Field Values
      • CACHED_IS_NETSCAPE

        public static final java.lang.String CACHED_IS_NETSCAPE
        The key for cached object representing whether it is a netscape browser.
        See Also:
        Constant Field Values
      • CACHED_SPECIFY_WIDTH_FOR_CELL

        public static final java.lang.String CACHED_SPECIFY_WIDTH_FOR_CELL
        The key for cached object representing whether we need to add the WIDTH attribute to the TD cell.
        This is required for the Lock headers feature.
        See Also:
        Constant Field Values
      • CACHED_SPECIFY_ID_FOR_FOR_TITLE_CELL

        public static final java.lang.String CACHED_SPECIFY_ID_FOR_FOR_TITLE_CELL
        The key for cached object representing whether if we need to add the ID attribute to the TD cells for TITLEs.
        This is required for the Lock headers feature.
        See Also:
        Constant Field Values
      • CACHED_MAX_COL_HEADER_DEPTH

        public static final java.lang.String CACHED_MAX_COL_HEADER_DEPTH
        The key for cached object representing the max col header depth.
        This is required for the sorting functionality.
        See Also:
        Constant Field Values
      • CACHED_FORMAL_PARAMETERS

        public static final java.lang.String CACHED_FORMAL_PARAMETERS
        The key for cached object representing the list of all the formal parameters for the current transform.
        See Also:
        Constant Field Values
      • CACHED_CONTEXT

        public static final java.lang.String CACHED_CONTEXT
        They key for cahced object representing the transform instance
        Since:
        MicroStrategy Web 8.0.1
        See Also:
        Constant Field Values
      • SORT_DESCENDING

        public static final java.lang.String SORT_DESCENDING
        indiate that the sort is in descending order
        See Also:
        Constant Field Values
      • SORT_ASCENDING

        public static final java.lang.String SORT_ASCENDING
        indiate that the sort is in ascending order
        See Also:
        Constant Field Values
      • SORT_KEY_SEPERATOR

        public static final java.lang.String SORT_KEY_SEPERATOR
        See Also:
        Constant Field Values
      • DRILL_RETAIN_THRESHOLDS_NO

        public static final java.lang.String DRILL_RETAIN_THRESHOLDS_NO
        indicate that drill doesn't retain thresholds
        See Also:
        Constant Field Values
      • DRILL_RETAIN_THRESHOLDS_YES

        public static final java.lang.String DRILL_RETAIN_THRESHOLDS_YES
        indicate that drill retains thresholds
        See Also:
        Constant Field Values
      • DRILL_RETAIN_THRESHOLDS_USE_DRILL_PATH

        public static final java.lang.String DRILL_RETAIN_THRESHOLDS_USE_DRILL_PATH
        indicate that whether drill retains thresholds depends on the drill path.
        See Also:
        Constant Field Values
      • DRILL_RETAIN_PARENT_NO

        public static final java.lang.String DRILL_RETAIN_PARENT_NO
        indicate that drill doesn't retain parent
        Since:
        MicroStrategy Web 7.5.0
        See Also:
        Constant Field Values
      • DRILL_RETAIN_PARENT_YES

        public static final java.lang.String DRILL_RETAIN_PARENT_YES
        indicate that drill retains parent
        Since:
        MicroStrategy Web 7.5.0
        See Also:
        Constant Field Values
      • DRILL_RETAIN_PARENT_USE_DRILL_PATH

        public static final java.lang.String DRILL_RETAIN_PARENT_USE_DRILL_PATH
        indicate that whether drill retains parent depends on the drill path.
        Since:
        MicroStrategy Web 7.5.0
        See Also:
        Constant Field Values
      • LOCK_HEADERS_PROPERTY_GROUP

        public static final java.lang.String LOCK_HEADERS_PROPERTY_GROUP
        The report property group name for lock headers
        See Also:
        Constant Field Values
      • LOCK_ROW_HEADERS_PROPERTY_NAME

        public static final java.lang.String LOCK_ROW_HEADERS_PROPERTY_NAME
        The report property name for lock row headers
        See Also:
        Constant Field Values
      • LOCK_ROW_HEADERS_PROPERTY_ON

        public static final java.lang.String LOCK_ROW_HEADERS_PROPERTY_ON
        The report property value for lock row headers being ON
        See Also:
        Constant Field Values
      • LOCK_ROW_HEADERS_PROPERTY_OFF

        public static final java.lang.String LOCK_ROW_HEADERS_PROPERTY_OFF
        The report property value for lock row headers being OFF
        See Also:
        Constant Field Values
      • LOCK_COLUMN_HEADERS_PROPERTY_NAME

        public static final java.lang.String LOCK_COLUMN_HEADERS_PROPERTY_NAME
        The report property name for lock column headers
        See Also:
        Constant Field Values
      • LOCK_COLUMN_HEADERS_PROPERTY_ON

        public static final java.lang.String LOCK_COLUMN_HEADERS_PROPERTY_ON
        The report property value for lock column headers being ON
        See Also:
        Constant Field Values
      • LOCK_COLUMN_HEADERS_PROPERTY_OFF

        public static final java.lang.String LOCK_COLUMN_HEADERS_PROPERTY_OFF
        The report property value for lock row headers being OFF
        See Also:
        Constant Field Values
    • Constructor Detail

      • ReportTransformHelper

        public ReportTransformHelper()
    • Method Detail

      • getSinglePivotLink

        public static java.lang.String getSinglePivotLink​(ReportBean rb,
                                                          java.lang.String fromAxis,
                                                          java.lang.String fromPos,
                                                          java.lang.String toAxis,
                                                          java.lang.String toPos,
                                                          boolean applyNow,
                                                          java.lang.String extraURL,
                                                          boolean addState,
                                                          EventManager eventManager)
        get a link for a pivot action.
        Parameters:
        rb - the ReportBean object
        fromAxis - the origin axis
        fromPos - the origin position
        toAxis - the target axis
        toPos - the target position
        applyNow - whether to apply change
        extraURL - extra url information to append
        addState - whether add the beans's state
        eventManager - EventManager object
        Returns:
        the link as String
      • getSinglePivotEvent

        public static WebEvent getSinglePivotEvent​(ReportBean rb,
                                                   java.lang.String fromAxis,
                                                   java.lang.String fromPos,
                                                   java.lang.String toAxis,
                                                   java.lang.String toPos,
                                                   boolean applyNow)
        get event object for a pivot action.
        Parameters:
        rb - the ReportBean object
        fromAxis - the origin axis
        fromPos - the origin position
        toAxis - the target axis
        toPos - the target position
        applyNow - whether to apply change
        Returns:
        the WebEvent object
      • getRemoveUnitLink

        public static java.lang.String getRemoveUnitLink​(ReportBean rb,
                                                         java.lang.String fromAxis,
                                                         java.lang.String fromPos,
                                                         boolean applyNow,
                                                         java.lang.String extraURL,
                                                         boolean addState,
                                                         EventManager eventManager)
        Deprecated.
        get a link for a remove action for a template unit.
        Parameters:
        rb - the ReportBean object
        fromAxis - the origin axis
        fromPos - the origin position
        applyNow - whether to apply change
        extraURL - extra url information to append
        addState - whether add the beans's state
        eventManager - EventManager object
        Returns:
        the link as String
      • getRemoveWorkingSetUnitEvent

        public static WebEvent getRemoveWorkingSetUnitEvent​(ReportBean rb,
                                                            WebObjectInfo object,
                                                            boolean applyNow)
        get an event object for a remove action for a working set unit.
        Parameters:
        rb - the ReportBean object
        object - the working set object
        applyNow - whether to apply change
        Returns:
        the event object
      • getRemoveWorkingSetAllMetricsEvent

        public static WebEvent getRemoveWorkingSetAllMetricsEvent​(ReportBean rb,
                                                                  boolean applyNow)
        Parameters:
        rb - ReportBean
        applyNow - boolean
        Returns:
        WebEvent
        Since:
        MicroStrategy Web 7.5.1
      • getRemoveTemplateUnitEvent

        public static WebEvent getRemoveTemplateUnitEvent​(ReportBean rb,
                                                          java.lang.String fromAxis,
                                                          java.lang.String fromPos,
                                                          boolean applyNow)
        Deprecated.
        get an event object for a remove action.
        Parameters:
        rb - the ReportBean object
        fromAxis - the origin axis
        fromPos - the origin position
        applyNow - whether to apply change
        Returns:
        the event object
      • getRemoveMetricLink

        public static java.lang.String getRemoveMetricLink​(ReportBean rb,
                                                           java.lang.String metricPos,
                                                           boolean applyNow,
                                                           java.lang.String extraURL,
                                                           boolean addState,
                                                           EventManager eventManager)
        Deprecated.
        get a link for a remove metric action.
        Parameters:
        rb - the ReportBean object
        metricPos - the metric position
        applyNow - whether to apply change
        extraURL - extra url information to append
        addState - whether add the beans's state
        eventManager - EventManager object
        Returns:
        the link as String
      • getRemoveMetricEvent

        public static WebEvent getRemoveMetricEvent​(ReportBean rb,
                                                    java.lang.String metricPos,
                                                    boolean applyNow)
        get an event object for a remove metric action.
        Parameters:
        rb - the ReportBean object
        metricPos - the metric position
        applyNow - whether to apply change
        Returns:
        the event object
      • getMoveMetricLink

        public static java.lang.String getMoveMetricLink​(ReportBean rb,
                                                         java.lang.String fromPos,
                                                         java.lang.String toPos,
                                                         boolean applyNow,
                                                         java.lang.String extraURL,
                                                         boolean addState,
                                                         EventManager eventManager)
        get a link for a move metric action.
        Parameters:
        rb - the ReportBean object
        fromPos - the origin position
        toPos - the target position
        applyNow - whether to apply change
        extraURL - extra url information to append
        addState - whether add the beans's state
        eventManager - EventManager object
        Returns:
        the link as String
      • getMoveMetricEvent

        public static WebEvent getMoveMetricEvent​(ReportBean rb,
                                                  java.lang.String fromPos,
                                                  java.lang.String toPos,
                                                  boolean applyNow)
        get an event object for a move metric action.
        Parameters:
        rb - the ReportBean object
        fromPos - the origin position
        toPos - the target position
        applyNow - whether to apply change
        Returns:
        the event object
      • mapStyleNameToCssFileName

        public static java.lang.String mapStyleNameToCssFileName​(java.lang.String styleName)
        map a style name to a css file name.
        For example, the styleName is passed in as "Accounting", the returned value will be "ReportTransformGridAccounting".
        Parameters:
        styleName - style name
        Returns:
        css file name
      • mapCssFileNameToStyleName

        public static java.lang.String mapCssFileNameToStyleName​(java.lang.String fileName)
        Deprecated.
        map a css file name to a style name.
        For example, the fileName is passed in as "ReportTransformGridAccounting", the returned value will be "Accounting".
        Parameters:
        fileName - css file name
        Returns:
        style name
      • getObjectIDInfo

        public static java.lang.String getObjectIDInfo​(WebTemplateUnit unit)
        Based on the type of unit instance, obtain its ID
        Parameters:
        unit - WebTemplateUnit instance to analyze
        Returns:
        String value with the object ID information.
        Since:
        MicroStrategy Web 7.5.1
      • getObjectTypeInfo

        public static int getObjectTypeInfo​(WebTemplateUnit unit)
        Get the object type defined for the WebTemplateUnit specified
        Parameters:
        unit - WebTemplateUnit instance to analyze
        Returns:
        value from the EnumDSSXMLObjectTypes enumeration indicating the object type of the instance
        Since:
        MicroStrategy Web 7.5.1
      • isNewDerivedElements

        public static boolean isNewDerivedElements​(WebTitle title)
        Returns whether the title object is new Derived Elements.
        Parameters:
        title - WebTitle object
        Returns:
        whether the title object is new Derived Elements
      • generateRowTitleSortID

        public static java.lang.String generateRowTitleSortID​(WebTitle title,
                                                              WebSubTitle subTitle)
        generate the sort id for row title.
        Parameters:
        title - WebTitle object
        subTitle - WebSubTitle object
        Returns:
        the sort id
      • generateRowTitleSortID

        public static java.lang.String generateRowTitleSortID​(WebSubTitle parentSubTitle,
                                                              WebSubTitle childSubTitle,
                                                              int axis)
        generate the sort id for row title.
        Parameters:
        parentSubTitle - WebSubTitle object
        childSubTitle - WebSubTitle object
        Returns:
        the sort id
        Since:
        MicroStrategy Web 8.0.2
      • generateColHeaderSortID

        public static java.lang.String generateColHeaderSortID​(ReportBean rb,
                                                               WebHeader header)
        generat the sort id for column header.
        Parameters:
        rb - the ReportBean object
        header - the WebHeader object
        Returns:
        the sort id
      • generateColHeaderSortDisplayString

        public static java.lang.String generateColHeaderSortDisplayString​(ReportBean rb,
                                                                          WebHeader header)
        generate the sort display for column header.
        Parameters:
        rb - the ReportBean object
        header - the WebHeader object
        Returns:
        the sort display
      • ignoreOldStyle

        public static boolean ignoreOldStyle​(ReportBean rb)
        whether the report is old or new formatting, depending on the report property value "IgnoreOldStyle".
        Parameters:
        rb - the ReportBean object
        Returns:
        whether the report is old or new formatting
      • getReportInstancePropertyValue

        public static java.lang.String getReportInstancePropertyValue​(ReportBean rb,
                                                                      int reportObjectType,
                                                                      java.lang.String propertySetName,
                                                                      java.lang.String propertyName)
        get a report property value.
        It can retrieve any property in any property set. Thus it may trigger a Iserver call.
        Parameters:
        rb - the ReportBean object
        reportObjectType - the object type (EnumDSSXMLReportObjects) for which the property will be
        propertySetName - the property name
        propertyName - the property name
        Returns:
        the property value
      • getReportPropertyValue

        public static java.lang.String getReportPropertyValue​(ReportBean rb,
                                                              java.lang.String propertyName)
        get a report property value.
        it may return "" if it's not in the webProperties list returned by I-server.
        The list is:
        WebGridProperties WebGridAutoStyle GridSortInfo ReportSourcePage ReportStyle HasSubtotals DrillingOptions DrillingEnableReportDrilling DrillingKeepParent MergeCells GraphFormat Indented OutlineLevelsExpanded SelectedAutostyle BandingOptions SelectedAutostyleID IgnoreOldStyle DrillingKeepParentEx DrillingThresholds
        Parameters:
        rb - the ReportBean object
        propertyName - the property name
        Returns:
        the property value
      • getReportStyleID

        public static java.lang.String getReportStyleID​(ReportBean rb)
        get report style id from report property "SelectedAutostyleID".
        Parameters:
        rb - the report bean object
        Returns:
        report style id
      • getReportStyleName

        public static java.lang.String getReportStyleName​(ReportBean rb)
        get report style name from report property "SelectedAutostyle".
        For old 6.x reports, we will read from report property "WebGridAutoStyle".
        Parameters:
        rb - the report bean object
        Returns:
        report style name from report property
      • getReportStyleLocalizedName

        public static java.lang.String getReportStyleLocalizedName​(ReportBean rb)
        get report localized style name.
        Parameters:
        rb - the report bean object
        Returns:
        localized style name
      • convertToLocalizedStyleName

        public static java.lang.String convertToLocalizedStyleName​(ReportBean rb,
                                                                   java.lang.String name)
        convert the style name to localized name, depending on the current session.
        Parameters:
        rb - the ReportBean object
        name - the style name
        Returns:
        localized name
      • displayCssFileContent

        public static void displayCssFileContent​(ReportBean rb,
                                                 MarkupOutput mo,
                                                 java.lang.String cssFileName)
        Generate the content of the specified CSS file in the output.
        We assume the CSS file is located in the style folder.
        Parameters:
        rb - ReportBean
        mo - MarkupOutput
        cssFileName - CSS file to read
      • displayCssFileContent

        public static void displayCssFileContent​(WebBean wb,
                                                 MarkupOutput mo,
                                                 java.lang.String cssFileName)
        Generate the content of the specified CSS file in the output.
        We assume the CSS file is located in the style folder.
        Parameters:
        wb - WebBean base instance
        mo - MarkupOutput where to save the HTML to render
        cssFileName - CSS file to read
        Since:
        MicroStrategy Web 8.0.0
      • displayCssFileContent

        public static void displayCssFileContent​(AppContext appContext,
                                                 MarkupOutput mo,
                                                 java.lang.String cssFileName)
        Generate the content of the specified CSS file in the output.
        We assume the CSS file is located in the style folder.
        Parameters:
        appContext - AppContext
        mo - MarkupOutput
        cssFileName - CSS file to read
      • generateMoveContextMenu

        public static boolean generateMoveContextMenu​(MarkupOutput mo,
                                                      ReportBean rb,
                                                      int pos,
                                                      boolean isFirst,
                                                      boolean isLast,
                                                      boolean applyNow,
                                                      java.lang.String extraUrl,
                                                      boolean isIFrame,
                                                      ContextMenu rhMenu,
                                                      ContextMenuManager cmm,
                                                      EventManager eventManager)
        generate a move RMC for a single metric specified by the position in the tempalte metrics collection.
        Parameters:
        mo - the MarkupOutput object
        rb - the ReportBean object
        pos - metric position
        isFirst - if it's the first metric
        isLast - if it's the last metric
        applyNow - whether to apply change
        extraUrl - extra url info to the link
        isIFrame - whether it is iframe
        rhMenu - ContextMenu object
        cmm - ContextMenuManager object
        eventManager - EventManager object
        Returns:
        whether the move item is added to the context menu
      • generateMoveContextMenu

        public static void generateMoveContextMenu​(MarkupOutput mo,
                                                   ReportBean rb,
                                                   int axis,
                                                   int pos,
                                                   boolean isFirst,
                                                   boolean isLast,
                                                   boolean applyNow,
                                                   java.lang.String extraUrl,
                                                   boolean isIFrame,
                                                   ContextMenu rhMenu,
                                                   ContextMenuManager cmm,
                                                   EventManager eventManager)
        generate a move RMC for a template unit specified by axis and position.
        Parameters:
        mo - the MarkupOutput object
        rb - the ReportBean object
        axis - template unit axis
        pos - template unit position
        isFirst - if it's the first unit in the axis
        isLast - if it's the last unit in the axis
        applyNow - whether to apply change
        extraUrl - extra url info to the link
        isIFrame - whether it is iframe enabled
        rhMenu - ContextMenu object
        cmm - ContextMenuManager object
        eventManager - EventManager object
      • generateMoveContextMenu

        public static void generateMoveContextMenu​(MarkupOutput mo,
                                                   ReportBean rb,
                                                   int axis,
                                                   int pos,
                                                   boolean isFirst,
                                                   boolean isLast,
                                                   java.lang.String boneId,
                                                   ContextMenu rhMenu,
                                                   ContextMenuManager cmm,
                                                   EventManager eventManager)
        generate a move RMC for a template unit specified by axis and position.
        Parameters:
        mo - the MarkupOutput object
        rb - the ReportBean object
        axis - template unit axis
        pos - template unit position
        isFirst - if it's the first unit in the axis
        isLast - if it's the last unit in the axis
        boneId - is the id of the client-side bone
        rhMenu - ContextMenu object
        cmm - ContextMenuManager object
        eventManager - EventManager object
        Since:
        MicroStrategy Web 8.0.0
      • generateRemoveWorkingSetUnitContextMenu

        public static void generateRemoveWorkingSetUnitContextMenu​(MarkupOutput mo,
                                                                   ReportBean rb,
                                                                   WebObjectInfo object,
                                                                   boolean applyNow,
                                                                   java.lang.String extraUrl,
                                                                   boolean isIframe,
                                                                   ContextMenu rhMenu,
                                                                   EventManager eventManager)
        generate Remove context menu for working set specified by axis and position.
        Parameters:
        mo - the MarkupOutput object
        rb - the ReportBean object
        object - the object to remove from the working set of the report
        applyNow - whether to apply change
        extraUrl - extra url info on the url
        isIframe - whether it is iframe enabled
        rhMenu - ContextMenu object
        eventManager - EventManager object
        Since:
        MicroStrategy Web 7.5.1
      • generateRemoveWorkingSetAllMetricsContextMenu

        public static void generateRemoveWorkingSetAllMetricsContextMenu​(MarkupOutput mo,
                                                                         ReportBean rb,
                                                                         boolean applyNow,
                                                                         java.lang.String extraUrl,
                                                                         boolean isIframe,
                                                                         ContextMenu rhMenu,
                                                                         EventManager eventManager)
        Parameters:
        mo - MarkupOutput instance where to save the HTML to render
        rb - ReportBean instance
        applyNow - boolean indicating if changes should be applied
        extraUrl - String
        isIframe - boolean indicating if it's iframe environment or not
        rhMenu - ContextMenu instance where to add the option
        eventManager - EventManager instance
        Since:
        MicroStrategy Web 7.5.1
      • generateRemoveContextMenu

        public static void generateRemoveContextMenu​(MarkupOutput mo,
                                                     ReportBean rb,
                                                     int axis,
                                                     int pos,
                                                     boolean applyNow,
                                                     java.lang.String extraUrl,
                                                     boolean isIframe,
                                                     ContextMenu rhMenu,
                                                     EventManager eventManager)
        Deprecated.
        generate Remove context menu for template unit specified by axis and position.
        Parameters:
        mo - the MarkupOutput object
        rb - the ReportBean object
        axis - template unit axis
        pos - template unit position
        applyNow - whether to apply change
        extraUrl - extra url info to the link
        isIframe - whether it is iframe enabled
        rhMenu - ContextMenu object
        eventManager - EventManager object
      • generateRemoveContextMenu

        public static void generateRemoveContextMenu​(MarkupOutput mo,
                                                     ReportBean rb,
                                                     int axis,
                                                     int pos,
                                                     java.lang.String boneId,
                                                     ContextMenu rhMenu,
                                                     EventManager eventManager)
        generate Remove context menu for template unit specified by axis and position.
        Parameters:
        mo - the MarkupOutput object
        rb - the ReportBean object
        axis - template unit axis
        pos - template unit position
        boneId - is the id of the client-side bone
        rhMenu - ContextMenu object
        eventManager - EventManager object
        Since:
        MicroStrategy Web 8.0.0
      • determineDrillRetainThreshold

        public static java.lang.String determineDrillRetainThreshold​(ReportBean rb,
                                                                     java.lang.String preferenceValue)
        Determins how the drill action will retain thresholds.
        The returen value could be DRILL_RETAIN_THRESHOLDS_NO, DRILL_RETAIN_THRESHOLDS_YES or DRILL_RETAIN_THRESHOLDS_USE_DRILL_PATH.
        Parameters:
        rb - the ReportBean object
        preferenceValue - the preference value
        Returns:
        how the drill action retains thresholds
      • determineDrillRetainParent

        public static java.lang.String determineDrillRetainParent​(ReportBean rb,
                                                                  java.lang.String preferenceValue)
        whether the drill action will retain parent.
        It depends on the report bean's information and the user preference value.
        It returns "1"(true) or "0" (false).
        Parameters:
        rb - the ReportBean object
        preferenceValue - the preference value
        Returns:
        whether the drill action retains parent
      • getPageByHeadersByIndex

        public static WebHeaders getPageByHeadersByIndex​(ReportBean rb,
                                                         WebGridHeaders pageHeaders,
                                                         int titleIndex)
        get pageby header list from index.
        Depending on whether the report is using DssXmlResultPageTreeStyle, we analyse differently.
        Parameters:
        rb - the ReportBean object
        pageHeaders - the pageby headers
        titleIndex - the index of the pageby item in the pageby axis
        Returns:
        the pageby header at that index
      • generateFormattingContextMenu

        public static void generateFormattingContextMenu​(MarkupOutput mo,
                                                         ReportBean rb,
                                                         int pos,
                                                         java.lang.String extraUrl,
                                                         boolean isIframe,
                                                         ContextMenu rhMenu,
                                                         EventManager eventManager)
        generate Formatting context menu for single metric.
        It uses the value sent as position (pos) minus one.
        Parameters:
        mo - the MarkupOutput object
        rb - the ReportBean object
        pos - metric position
        extraUrl - extra url info to the link
        isIframe - whether it is iframe enabled
        rhMenu - ContextMenu object
        eventManager - EventManager object
      • generateFormattingContextMenu

        public static void generateFormattingContextMenu​(MarkupOutput mo,
                                                         ReportBean rb,
                                                         int axis,
                                                         int pos,
                                                         java.lang.String extraUrl,
                                                         boolean isIframe,
                                                         ContextMenu rhMenu,
                                                         EventManager eventManager)
        generate Formatting context menu for the template unit specified by axis and position.
        Parameters:
        mo - the MarkupOutput object
        rb - the ReportBean object
        axis - template unit axis
        pos - template unit position
        extraUrl - extra url info to the link
        isIframe - whether it is iframe enabled
        rhMenu - ContextMenu object
        eventManager - EventManager object
      • generateRenameContextMenu

        public static void generateRenameContextMenu​(MarkupOutput mo,
                                                     ReportBean rb,
                                                     int key,
                                                     java.lang.String extraUrl,
                                                     boolean isIframe,
                                                     ContextMenu rhMenu,
                                                     EventManager eventManager)
        generate rename context menu for template unit.
        Parameters:
        mo - the MarkupOutput object
        rb - the ReportBean object
        extraUrl - extra url info to the link
        isIframe - whether it is iframe enabled
        rhMenu - ContextMenu object
        key - integer value with the key of the object to be renamed
        eventManager - EventManager object
      • getFilter

        public static WebFilter getFilter​(ReportBean rb,
                                          int filterType)
        get a filter object from a filter type.
        Parameters:
        rb - the ReportBean object
        filterType - the filter type from EnumFilterTypes
        Returns:
        the WebFilter object
      • getFilterExpression

        public static WebExpression getFilterExpression​(ReportBean rb,
                                                        int filterType)
        get a filter expression from a filter type.
        Parameters:
        rb - the ReportBean object
        filterType - the filter type from EnumFilterTypes
        Returns:
        the WebExpression object
        Since:
        MicroStrategy Web 8.0.0
      • getSortsubtotalPostion

        public static int getSortsubtotalPostion​(ReportBean rb)
        get the subtotal position for sorting.
        Parameters:
        rb - the ReportBean object
        Returns:
        the subtotal position for sorting
      • getToPageByPosition

        public static int getToPageByPosition​(ReportBean rb)
        get the target position for a pivot to pageby axis action.
        Out of box, we pivot the unit to the end of the pageby axis.
        Parameters:
        rb - the report bean object
        Returns:
        the target position
      • ReadReportSettings

        public static java.lang.String ReadReportSettings​(ReportBean rb,
                                                          java.lang.String PropertySet,
                                                          java.lang.String PropertyName)
        get report property value for DssXmlReportObjectMainTemplate object.
        This method is a special case of ReportTransformHelper.getReportInstancePropertyValue().
        Parameters:
        rb - the ReportBean object
        PropertySet - the property set name
        PropertyName - the property name
        Returns:
        the property value
      • isTotal

        public static boolean isTotal​(WebHeader header)
        return whether this header is a total header.
        Parameters:
        header - the WebHeader object
        Returns:
        whether this header is a total header
      • convertToNewStyleReport

        public static boolean convertToNewStyleReport​(ReportBean rb)
        Converts a report to New Style. Expects the report bean to have been executed before.
        Parameters:
        rb - ReportBean
        Returns:
        true if the style was applied
        Since:
        MicroStrategy Web 8.0.0
      • applyUserStyleToReport

        public static boolean applyUserStyleToReport​(ReportBean rb,
                                                     Preferences prefs)
        Applies the user's defined style if the Grid style preference is 'use my selected default grid style'.
        Parameters:
        rb - ReportBean
        prefs - Preferences
        Returns:
        true if the style was applied
        Since:
        MicroStrategy Web 8.0.0
      • renderMetricCellFormat

        public static void renderMetricCellFormat​(ReportGridCellMetricValue cell,
                                                  WebRowValue rowValue,
                                                  java.util.Locale locale)
                                           throws java.lang.IllegalArgumentException
        Throws:
        java.lang.IllegalArgumentException
        Since:
        MicroStrategy Web 7.5.4
      • renderHeaderCellFormat

        public static void renderHeaderCellFormat​(ReportGridDisplayCell cell,
                                                  WebHeader header,
                                                  java.util.Locale locale)
        Since:
        MicroStrategy Web 7.5.4
      • getNoDataCustomMessage

        public static java.lang.String getNoDataCustomMessage​(WebIServerSession session)
        Since:
        MicroStrategy Web 9.0.0
      • checkDisplayEmptyReportMessageInRWD

        public static boolean checkDisplayEmptyReportMessageInRWD​(WebIServerSession session)
        Since:
        MicroStrategy Web 9.0.0