public interface

ReportBean

implements ResultSetBean
com.microstrategy.web.beans.ReportBean

Class Overview

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.

Summary

[Expand]
Inherited Constants
From interface com.microstrategy.utils.serialization.EnumWebPersistableState
Public Methods
abstract void applyChanges()
abstract boolean canRedo()
Returns whether can perform redo on this report bean.
abstract boolean canUndo()
Returns whether can perform undo on this report bean.
abstract void clearUndoAndRedo()
Clear the undo and redo state, user could not perform undo and redo This method is called when the save action happens.
abstract void directSave(String desc)
abstract void directSave(String desc, int saveFlags)
abstract void directSave()
abstract boolean getCanReprompt()
abstract int getExecutionFlags()
Returns the report execution flags (EnumDSSXMLExecutionFlags).
abstract int getExecutionMode()
Returns the specified execution mode.
abstract WebReportExportSettings getExportSettings()
Returns export settings object that corresponds to the current execution mode (getExecutionMode()).
abstract ExpressionBean getFilterBean(int type)
abstract String getGraphBeanName()

Returns the name of its GraphBean.

abstract boolean getHasReset()
abstract boolean getHasUndo()
abstract boolean getIgnoreUserGridPrefs()
abstract WebReportData getReportData()
Returns the report result of the report instance contained in this ReportBean.
abstract ExpressionBean getReportFilterBean()
Returns a bean which can be used to view and modify the report filter of the report.
abstract WebReportInstance getReportInstance()
Returns the WebReportInstance object contained in the current ReportBean.
abstract ReportPageInfo getReportPageInfo(int reportPageType)
Returns an instance of ReportPageInfo based on the page type specified.
abstract ReportPageInfo getReportPageInfo()
Returns an instance of ReportPageInfo.
abstract int getResultFlags()
Returns the report result flags (EnumDSSXMLResultFlags).
abstract WebResultSettings getResultSettings()
Returns an instance of WebResultSettings.
abstract String getSaveFolderId()
abstract boolean getSaved()
abstract ExpressionBean getUnitLimitBean()
abstract boolean getUseCaches()
Returns the boolean value indicating whether to use the Intelligence Server's cache to cache the report execution results.
abstract ViewBean getViewBean()

Returns the ViewBean of this report.

abstract WebEventHandler getViewEventHandler()

Returns the WebEventHandler of its ViewBean.

abstract ExpressionBean getViewFilterBean()
Returns a bean which can be used to view and modify the view filter of the report.
abstract ExpressionBean getViewLimitBean()
abstract int getViewMode()
Returns the report view mode of EnumWebReportViewMode.
abstract int getVisualizationViewMode()
Returns the current visualization view mode for the report instance.
abstract WebGraph getWebGraph()
Returns the WebGraph object of the report instance contained in this ReportBean.
abstract void initializeFromSource(String sourceID, int sourceType)
Initializes the bean using the source information
abstract boolean isDrilled()
Returns a boolean value indicating whether the current report instance was obtained after drilling.
abstract boolean isFilterSupported(int type)
abstract boolean isMdxReport()
abstract boolean isPrompted(boolean includeDormant)
Returns whether the report is prompted or not.
abstract boolean isSubsetReport()
abstract boolean isViewModeSwitched()
abstract void populateObject(WebObjectInfo oi)
abstract void redo()
Redo the next change we did before and go to next state where this bean was.
abstract void refresh()
Refreshes the WebReportInstance contained in this ReportBean.
abstract void setApplyChangesOnCollectData(boolean _applyChangesOnCollectData)
abstract void setCanRePrompt(boolean value)
abstract void setExecutionFlags(int executionFlags)
Sets the report execution flags (EnumDSSXMLExecutionFlags).
abstract void setExecutionMode(int mode)
Sets the right execution mode An execution mode indicates what the intended usage of this bean is.
abstract void setFilterID(String filterID)
Sets a filter ID on the current ReportBean.
abstract void setGraphBeanName(String name)

Sets the name of its GraphBean.

abstract void setHasReset(boolean _value)
abstract void setIgnoreUserGridPrefs(boolean val)
abstract void setReportInstance(WebReportInstance ri)
abstract void setResultFlags(int resultFlags)
Sets the report result flags (EnumDSSXMLResultFlags).
abstract void setSaveFolderId(String folderId)
abstract void setSaved(boolean _saved)
abstract void setTemplateID(String templateID)
Sets a template ID on the current ReportBean.
abstract void setUseCaches(boolean useCaches)
Sets the boolean value indicating whether to use the Intelligence Server's cache to cache the report execution results.
abstract void setViewEventHandler(WebEventHandler handler)

Set the WebEventHandler of its ViewBean.

abstract void setViewMode(int viewMode)
Sets the report view mode (EnumWebReportViewMode) on the current ReportBean.
abstract void setViewModeSwitched(boolean _isViewModeSwitched)
abstract void setVisualizationViewMode(int viewMode)
Sets the visualization view mode for the report instance.
abstract void undo()
Undo the latest change and back to the previous state.
[Expand]
Inherited Methods
From interface com.microstrategy.utils.serialization.Persistable
From interface com.microstrategy.web.beans.ObjectBean
From interface com.microstrategy.web.beans.RequestPersistable
From interface com.microstrategy.web.beans.ResultSetBean
From interface com.microstrategy.web.beans.Transformable
From interface com.microstrategy.web.beans.WebBean
From interface com.microstrategy.web.beans.WebComponent

Public Methods

public abstract void applyChanges ()

public abstract 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.

public abstract 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.

public abstract void clearUndoAndRedo ()

Clear the undo and redo state, user could not perform undo and redo This method is called when the save action happens.

public abstract void directSave (String desc)

public abstract void directSave (String desc, int saveFlags)

public abstract void directSave ()

public abstract boolean getCanReprompt ()

public abstract 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.

public abstract int getExecutionMode ()

Returns the specified execution mode. If one is not explicitly set, the default value is REPORT_MODE_DEFAULT

Returns
  • execution mode from EnumWebReportExecutionModes

public abstract WebReportExportSettings getExportSettings ()

Returns export settings object that corresponds to the current execution mode (getExecutionMode()). This object can be used to customize the export output.
The following describes the execution mode associations, and the export settings subclass, which WebReportExportSettings may be cast into:


It can be used as follows:

getReportBean().setExecutionMode(EnumWebReportExecutionModes.REPORT_MODE_PLAIN_TEXT);
WebReportPlainTextExportSettings exportSettings = (WebReportPlainTextExportSettings) getReportBean().getExportSettings();
exportSettings.setSeparator("|");
byte[] data = getReportBean().getReportInstance().getBinaryData();
String stringData = new String(data, "UnicodeLittle"); // optional (this should be avoided if possible)

Returns
  • export settings object associated with the current execution mode.

public abstract ExpressionBean getFilterBean (int type)

public abstract String getGraphBeanName ()

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

Returns
  • name of its GraphBean
See Also

public abstract boolean getHasReset ()

public abstract boolean getHasUndo ()

public abstract boolean getIgnoreUserGridPrefs ()

public abstract WebReportData getReportData ()

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.

public abstract ExpressionBean getReportFilterBean ()

Returns a bean which can be used to view and modify the report filter of the report.

Returns

public abstract WebReportInstance getReportInstance ()

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.

public abstract 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.

public abstract 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.

public abstract 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.

public abstract WebResultSettings getResultSettings ()

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
Throws
WebBeanException
WebBeanException

public abstract String getSaveFolderId ()

public abstract boolean getSaved ()

public abstract ExpressionBean getUnitLimitBean ()

public abstract 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

public abstract ViewBean getViewBean ()

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

public abstract WebEventHandler getViewEventHandler ()

Returns the WebEventHandler of its ViewBean.

Returns
  • the event handler of its ViewBean
See Also

public abstract ExpressionBean getViewFilterBean ()

Returns a bean which can be used to view and modify the view filter of the report.

Returns

public abstract ExpressionBean getViewLimitBean ()

public abstract 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.

public abstract int getVisualizationViewMode ()

Returns the current visualization view mode for the report instance.

Returns
  • The current visualization view mode.

public abstract WebGraph getWebGraph ()

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.

public abstract void initializeFromSource (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.

public abstract boolean isDrilled ()

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.

public abstract boolean isFilterSupported (int type)

public abstract boolean isMdxReport ()

public abstract boolean isPrompted (boolean includeDormant)

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.

public abstract boolean isSubsetReport ()

public abstract boolean isViewModeSwitched ()

public abstract void populateObject (WebObjectInfo oi)

public abstract void redo ()

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.

public abstract void refresh ()

Refreshes the WebReportInstance contained in this ReportBean. This refresh will not reopen the answered prompt, if there is any.

Throws
WebBeanException thrown if error occurs when refreshing.

public abstract void setApplyChangesOnCollectData (boolean _applyChangesOnCollectData)

public abstract void setCanRePrompt (boolean value)

public abstract 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.

public abstract 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

public abstract void setFilterID (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.

public abstract void setGraphBeanName (String name)

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

Parameters
name GraphBean name
See Also

public abstract void setHasReset (boolean _value)

public abstract void setIgnoreUserGridPrefs (boolean val)

public abstract void setReportInstance (WebReportInstance ri)

public abstract 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

public abstract void setSaveFolderId (String folderId)

public abstract void setSaved (boolean _saved)

public abstract void setTemplateID (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.

public abstract 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

public abstract void setViewEventHandler (WebEventHandler handler)

Set the WebEventHandler of its ViewBean.

Parameters
handler ViewBean event handler
See Also

public abstract 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.

public abstract void setViewModeSwitched (boolean _isViewModeSwitched)

public abstract void setVisualizationViewMode (int viewMode)

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.

public abstract void undo ()

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.