Interface ReportBean

  • All Superinterfaces:
    EnumWebPersistableState, ObjectBean, Persistable, RequestPersistable, ResultSetBean, Transformable, WebBean, WebComponent

    public interface ReportBean
    extends ResultSetBean
    This interface is used to manage the collection of report data and enable it to be rendered. It leverages many of the features of the WebBean and ObjectBean interfaces. It reuses the ObjectBean interface to allow a report to: (a) be retrieved by name (and with wildcard) (b) retrieve its parent folder bean.

    The main methods it provides in this interface are:

    • Report execution settings: Users can set the message ID, state ID and synchronous nature of the request. Users can also have the report directly saved in the Inbox and control whether server-side caches are used and updated or not used at all.
    • In-memory HTML caching: If the application builder wants to hold a Report Bean in the user's session or the application context, it may do so as a way of caching the report results. If done in this manner, the report grid need not be transformed with every request to transform, but only when the report is retrieved from the Intelligence Server. In this way, the Report Bean may be instructed on when to release its XML and re-execute the report. This is done using a simple expiration time period, in hours.
    • Execute a report by specifying a template and a filter.
    Since:
    MicroStrategy Web 7.3.1 or earlier
    • Method Detail

      • getReportInstance

        WebReportInstance getReportInstance()
                                     throws WebBeanException
        Returns the WebReportInstance object contained in the current ReportBean. The WebReportInstance is where to set result flags, retrieve the report result data, and manipulate the report.
        Returns:
        the WebReportInstance contained.
        Throws:
        WebBeanException - thrown if error ocurred when running the report.
      • getReportData

        WebReportData getReportData()
                             throws WebBeanException
        Returns the report result of the report instance contained in this ReportBean. The WebReportData is where to retrieve the report grid data and related information.
        Returns:
        the WebReportData from the current report.
        Throws:
        WebBeanException - thrown if the report result can not be retrieved.
      • isDrilled

        boolean isDrilled()
                   throws WebBeanException
        Returns a boolean value indicating whether the current report instance was obtained after drilling.
        Returns:
        true if the current report instance was obtained after drilling.
        Throws:
        WebBeanException - thrown if error ocurred when retrieving the drilled information.
      • getUseCaches

        boolean getUseCaches()
        Returns the boolean value indicating whether to use the Intelligence Server's cache to cache the report execution results.
        Returns:
        true if use the Intelligence Server's cache
      • setUseCaches

        void setUseCaches​(boolean useCaches)
        Sets the boolean value indicating whether to use the Intelligence Server's cache to cache the report execution results.
        Parameters:
        useCaches - true if use the Intelligence Server's cache
      • getWebGraph

        WebGraph getWebGraph()
                      throws WebBeanException
        Returns the WebGraph object of the report instance contained in this ReportBean. The WebGraph instance could be use to render the report result in graph mode.
        Returns:
        the WebGraph object for the current report instance.
        Throws:
        WebBeanException - thrown if error ocurred when retrieving the report graph data.
      • getReportPageInfo

        ReportPageInfo getReportPageInfo()
        Returns an instance of ReportPageInfo. The page type is defaulted to EnumReportPageType.ReportPageAbsolute. The possible page types are listed under EnumReportPageType.
        Returns:
        an instance of ReportPageInfo.
      • getReportPageInfo

        ReportPageInfo getReportPageInfo​(int reportPageType)
        Returns an instance of ReportPageInfo based on the page type specified. The possible page types are listed under EnumReportPageType.
        Parameters:
        reportPageType - the report page type.
        Returns:
        an instance of ReportPageInfo based on the page type.
      • getViewMode

        int getViewMode()
        Returns the report view mode of EnumWebReportViewMode. By default, the view mode is set to the grid mode.
        Returns:
        the report view mode.
      • setViewMode

        void setViewMode​(int viewMode)
        Sets the report view mode (EnumWebReportViewMode) on the current ReportBean. By default, the view mode was set to the gride mode.
        Parameters:
        viewMode - a new report view mode.
      • setFilterID

        void setFilterID​(java.lang.String filterID)
        Sets a filter ID on the current ReportBean. This method is intended to be used together with setTemplateID.
        Parameters:
        filterID - the object id of a WebFilter object.
      • setTemplateID

        void setTemplateID​(java.lang.String templateID)
        Sets a template ID on the current ReportBean. This method is intended to be used together with setFilterID.
        Parameters:
        templateID - the object id of a WebTemplate object.
      • getResultFlags

        int getResultFlags()
        Returns the report result flags (EnumDSSXMLResultFlags). The result flags controls what data is brought back from the Intelligence Server when executing a report.
        Returns:
        the report result flags.
      • setResultFlags

        void setResultFlags​(int resultFlags)
        Sets the report result flags (EnumDSSXMLResultFlags). The result flags controls what data is brought back from the Intelligence Server when executing a report.
        Parameters:
        resultFlags - the report result flags
      • isPrompted

        boolean isPrompted​(boolean includeDormant)
                    throws WebBeanException
        Returns whether the report is prompted or not. The includeDormant parameter will determine whether dormant prompts should be considered in the result.
        Parameters:
        includeDormant - True if the presence of a dormant prompt should cause this method to return true, false if this method should only consider the report prompted if it contains used prompts.
        Returns:
        Whether the report is prompted.
        Throws:
        WebBeanException - thrown if error ocurred when retrieving the prompted information.
      • getExecutionFlags

        int getExecutionFlags()
        Returns the report execution flags (EnumDSSXMLExecutionFlags). This flag is passed to the PublicationBeanSource} when running a new report.
        Returns:
        the report execution flags.
      • setExecutionFlags

        void setExecutionFlags​(int executionFlags)
        Sets the report execution flags (EnumDSSXMLExecutionFlags). This flag is passed to the embedded WebReportSource when running a new report.
        Parameters:
        executionFlags - the report execution flags.
      • setViewEventHandler

        void setViewEventHandler​(WebEventHandler handler)

        Set the WebEventHandler of its ViewBean.

        Parameters:
        handler - ViewBean event handler
        Since:
        MicroStrategy Web 8.0.0
        See Also:
        getViewBean()
      • getViewEventHandler

        WebEventHandler getViewEventHandler()

        Returns the WebEventHandler of its ViewBean.

        Returns:
        the event handler of its ViewBean
        Since:
        MicroStrategy Web 8.0.0
        See Also:
        getViewBean()
      • getViewBean

        ViewBean getViewBean()
                      throws WebBeanException

        Returns the ViewBean of this report. The ViewBean encapsulates grid and graph data associated with its WebTemplate.

        Returns:
        the ViewBean associated with this report
        Throws:
        WebBeanException - if there is a problem retrieving the associated ViewBean
        Since:
        MicroStrategy Web 8.0.0
      • setGraphBeanName

        void setGraphBeanName​(java.lang.String name)

        Sets the name of its GraphBean. The GraphBean may be obtained from the ViewBean.

        Parameters:
        name - GraphBean name
        Since:
        MicroStrategy Web 8.0.0
        See Also:
        ViewBean
      • getGraphBeanName

        java.lang.String getGraphBeanName()

        Returns the name of its GraphBean. The GraphBean may be obtained from the ViewBean.

        Returns:
        name of its GraphBean
        Since:
        MicroStrategy Web 8.0.0
        See Also:
        ViewBean
      • canUndo

        boolean canUndo()
        Returns whether can perform undo on this report bean. This bean will not be able to perform undo, when there is no previous state left for this bean to undo, or when undo is disabled (if SDK is not able to get the state information from Intelligence Server).
        Returns:
        boolean true when undo can be performed on this report bean. Otherwise, false.
        Since:
        MicroStrategy Web 8.0.0
      • canRedo

        boolean canRedo()
        Returns whether can perform redo on this report bean. This bean will not be able to perform redo, when there is no next state left for this bean to redo, or when redo is disabled (if SDK is not able to get the state information from Intelligence Server).
        Returns:
        boolean true when redo can be performed on this report bean. Otherwise, false.
        Since:
        MicroStrategy Web 8.0.0
      • clearUndoAndRedo

        void clearUndoAndRedo()
        Clear the undo and redo state, user could not perform undo and redo This method is called when the save action happens.
        Since:
        MicroStrategy Web 9.3.1
      • undo

        void undo()
           throws WebBeanException
        Undo the latest change and back to the previous state.
        Throws:
        WebBeanException - thrown when the report bean can not perform undo, or we have problem in getting information from Intelligence Server.
        Since:
        MicroStrategy Web 8.0.0
      • redo

        void redo()
           throws WebBeanException
        Redo the next change we did before and go to next state where this bean was.
        Throws:
        WebBeanException - thrown when the report bean can not perform redo, or we have problem in getting information from Intelligence Server.
        Since:
        MicroStrategy Web 8.0.0
      • getExecutionMode

        int getExecutionMode()
        Returns the specified execution mode. If one is not explicitly set, the default value is EnumWebReportExecutionModes.REPORT_MODE_DEFAULT
        Returns:
        execution mode from EnumWebReportExecutionModes
        Since:
        MicroStrategy Web 8.0.0
      • setExecutionMode

        void setExecutionMode​(int mode)
        Sets the right execution mode An execution mode indicates what the intended usage of this bean is. This allows for executing the underlying report with the right set of execution flags
        Parameters:
        mode - a value from the enumeration EnumWebReportExecutionModes
        Since:
        MicroStrategy Web 8.0.0
      • getViewFilterBean

        ExpressionBean getViewFilterBean()
        Returns a bean which can be used to view and modify the view filter of the report.
        Returns:
        An ExpressionBean linked to the view filter.
        Since:
        MicroStrategy Web 8.0.0
      • getReportFilterBean

        ExpressionBean getReportFilterBean()
        Returns a bean which can be used to view and modify the report filter of the report.
        Returns:
        An ExpressionBean linked to the report filter.
        Since:
        MicroStrategy Web 8.0.0
      • getResultSettings

        WebResultSettings getResultSettings()
                                     throws WebBeanException
        Returns an instance of WebResultSettings. Properties defined on the returned instance are valid only during the lifetime of this bean These properties are not persisted. Also, if there is a call that effectively clears out the underlying instance (another call to setObjectName), the properties defined on the result settings are reset to default values.
        Returns:
        an instance of WebResultSettings.
        Throws:
        WebBeanException
        Since:
        MicroStrategy Web 8.0.0
      • initializeFromSource

        void initializeFromSource​(java.lang.String sourceID,
                                  int sourceType)
        Initializes the bean using the source information
        Parameters:
        sourceID - the DSSID of the source object (i.e. an xda report)
        sourceType - a value from EnumWebReportSourceType
        Throws:
        WebBeanException - thrown if any error ocurrs during setting up the bean using the schedule passed.
        Since:
        MicroStrategy Web 8.0.2
      • isMdxReport

        boolean isMdxReport()
        Since:
        MicroStrategy Web 8.0.2
      • getFilterBean

        ExpressionBean getFilterBean​(int type)
        Since:
        MicroStrategy Web 8.0.2
      • isFilterSupported

        boolean isFilterSupported​(int type)
        Since:
        MicroStrategy Web 8.0.2
      • getVisualizationViewMode

        int getVisualizationViewMode()
                              throws WebBeanException
        Returns the current visualization view mode for the report instance.
        Returns:
        The current visualization view mode.
        Throws:
        WebBeanException
        Since:
        MicroStrategy Web 8.0.2
      • setVisualizationViewMode

        void setVisualizationViewMode​(int viewMode)
                               throws WebBeanException
        Sets the visualization view mode for the report instance. It is necessary to call applyChanges on the manipulator in order for this change to be persisted to backend.
        Parameters:
        viewMode - The new visualization view mode.
        Throws:
        WebBeanException
        Since:
        MicroStrategy Web 8.0.2
      • getViewLimitBean

        ExpressionBean getViewLimitBean()
        Since:
        MicroStrategy Web 9.0.0
      • isSubsetReport

        boolean isSubsetReport()
        Since:
        MicroStrategy Web 9.0.0
      • getUnitLimitBean

        ExpressionBean getUnitLimitBean()
        Since:
        MicroStrategy Web 9.0.0
      • setApplyChangesOnCollectData

        void setApplyChangesOnCollectData​(boolean _applyChangesOnCollectData)
        Since:
        MicroStrategy Web 9.0.0
      • getIgnoreUserGridPrefs

        boolean getIgnoreUserGridPrefs()
      • setIgnoreUserGridPrefs

        void setIgnoreUserGridPrefs​(boolean val)
        Since:
        MicroStrategy Web 8.1.1
      • setCanRePrompt

        void setCanRePrompt​(boolean value)
        Since:
        MicroStrategy Web 9.0.0
      • getCanReprompt

        boolean getCanReprompt()
        Since:
        MicroStrategy Web 9.0.0
      • setViewModeSwitched

        void setViewModeSwitched​(boolean _isViewModeSwitched)
        Since:
        MicroStrategy Web 9.3.1
      • isViewModeSwitched

        boolean isViewModeSwitched()
      • setSaved

        void setSaved​(boolean _saved)
        Since:
        MicroStrategy Web 9.3.1 indicate if the report has been saved.
      • getSaved

        boolean getSaved()
        Since:
        MicroStrategy Web 9.3.1 used to disable the save button of prompt report
      • getHasUndo

        boolean getHasUndo()
        Since:
        MicroStrategy Web 9.3.1 used to maintain the state when redo/undo/reset data
      • setHasReset

        void setHasReset​(boolean _value)
      • getHasReset

        boolean getHasReset()
      • getSaveFolderId

        java.lang.String getSaveFolderId()
      • setSaveFolderId

        void setSaveFolderId​(java.lang.String folderId)
      • isNewlyCreatedSubsetReport

        boolean isNewlyCreatedSubsetReport​(java.lang.String rid)
        Since:
        MicroStrategy Web 10.12 used to check the subReport is newly created or already saved
      • getSourceId

        java.lang.String getSourceId()
        used to get source ID of report