Package com.microstrategy.web.beans
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 theWebBeanandObjectBeaninterfaces. It reuses theObjectBeaninterface 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
 
 
- 
- 
Field Summary
- 
Fields inherited from interface com.microstrategy.utils.serialization.EnumWebPersistableState
BARE_MINIMAL_STATE_INFO, MAXIMAL_STATE_INFO, MINIMAL_STATE_INFO, TYPICAL_STATE_INFO 
 - 
 
- 
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidapplyChanges()booleancanRedo()Returns whether can perform redo on this report bean.booleancanUndo()Returns whether can perform undo on this report bean.voidclearUndoAndRedo()Clear the undo and redo state, user could not perform undo and redo This method is called when the save action happens.voiddirectSave()voiddirectSave(java.lang.String desc)voiddirectSave(java.lang.String desc, int saveFlags)booleangetCanReprompt()intgetExecutionFlags()Returns the report execution flags (EnumDSSXMLExecutionFlags).intgetExecutionMode()Returns the specified execution mode.WebReportExportSettingsgetExportSettings()Returns export settings object that corresponds to the current execution mode (getExecutionMode()).ExpressionBeangetFilterBean(int type)java.lang.StringgetGraphBeanName()Returns the name of itsGraphBean.booleangetHasReset()booleangetHasUndo()booleangetIgnoreUserGridPrefs()WebReportDatagetReportData()Returns the report result of the report instance contained in this ReportBean.ExpressionBeangetReportFilterBean()Returns a bean which can be used to view and modify the report filter of the report.WebReportInstancegetReportInstance()Returns theWebReportInstanceobject contained in the current ReportBean.ReportPageInfogetReportPageInfo()Returns an instance ofReportPageInfo.ReportPageInfogetReportPageInfo(int reportPageType)Returns an instance ofReportPageInfobased on the page type specified.intgetResultFlags()Returns the report result flags (EnumDSSXMLResultFlags).WebResultSettingsgetResultSettings()Returns an instance ofWebResultSettings.booleangetSaved()java.lang.StringgetSaveFolderId()java.lang.StringgetSourceId()used to get source ID of reportExpressionBeangetUnitLimitBean()booleangetUseCaches()Returns the boolean value indicating whether to use the Intelligence Server's cache to cache the report execution results.ViewBeangetViewBean()Returns theViewBeanof this report.WebEventHandlergetViewEventHandler()Returns theWebEventHandlerof itsViewBean.ExpressionBeangetViewFilterBean()Returns a bean which can be used to view and modify the view filter of the report.ExpressionBeangetViewLimitBean()intgetViewMode()Returns the report view mode ofEnumWebReportViewMode.intgetVisualizationViewMode()Returns the current visualization view mode for the report instance.WebGraphgetWebGraph()Returns theWebGraphobject of the report instance contained in this ReportBean.voidinitializeFromSource(java.lang.String sourceID, int sourceType)Initializes the bean using the source informationbooleanisDrilled()Returns a boolean value indicating whether the current report instance was obtained after drilling.booleanisFilterSupported(int type)booleanisMdxReport()booleanisNewlyCreatedSubsetReport(java.lang.String rid)booleanisPrompted(boolean includeDormant)Returns whether the report is prompted or not.booleanisSubsetReport()booleanisViewModeSwitched()voidpopulateObject(WebObjectInfo oi)voidredo()Redo the next change we did before and go to next state where this bean was.voidrefresh()Refreshes theWebReportInstancecontained in this ReportBean.voidsetApplyChangesOnCollectData(boolean _applyChangesOnCollectData)voidsetCanRePrompt(boolean value)voidsetExecutionFlags(int executionFlags)Sets the report execution flags (EnumDSSXMLExecutionFlags).voidsetExecutionMode(int mode)Sets the right execution mode An execution mode indicates what the intended usage of this bean is.voidsetFilterID(java.lang.String filterID)Sets a filter ID on the current ReportBean.voidsetGraphBeanName(java.lang.String name)Sets the name of itsGraphBean.voidsetHasReset(boolean _value)voidsetIgnoreUserGridPrefs(boolean val)voidsetReportInstance(WebReportInstance ri)voidsetResultFlags(int resultFlags)Sets the report result flags (EnumDSSXMLResultFlags).voidsetSaved(boolean _saved)voidsetSaveFolderId(java.lang.String folderId)voidsetTemplateID(java.lang.String templateID)Sets a template ID on the current ReportBean.voidsetUseCaches(boolean useCaches)Sets the boolean value indicating whether to use the Intelligence Server's cache to cache the report execution results.voidsetViewEventHandler(WebEventHandler handler)Set theWebEventHandlerof itsViewBean.voidsetViewMode(int viewMode)Sets the report view mode (EnumWebReportViewMode) on the current ReportBean.voidsetViewModeSwitched(boolean _isViewModeSwitched)voidsetVisualizationViewMode(int viewMode)Sets the visualization view mode for the report instance.voidundo()Undo the latest change and back to the previous state.- 
Methods inherited from interface com.microstrategy.web.beans.ObjectBean
getBlockBegin, getBlockCount, getDisplayName, getFlags, getLevel, getObjectID, getObjectInfo, getObjectName, getObjectType, getParentFolderBean, getParentFolderBean, getParentID, setBlockBegin, setBlockCount, setFlags, setLevel, setObjectID, setObjectInfo, setObjectName, setObjectType 
- 
Methods inherited from interface com.microstrategy.utils.serialization.Persistable
restoreState, restoreState, saveState, saveState, saveState, saveState 
- 
Methods inherited from interface com.microstrategy.web.beans.RequestPersistable
restoreStateFromRequest, restoreStateFromRequest 
- 
Methods inherited from interface com.microstrategy.web.beans.ResultSetBean
cancelRequest, getExpiration, getLastPromptMessageID, getMaxWait, getMessageID, getPollingFrequency, getPromptsBean, getPromptsEventHandler, getResultSetInstance, getSaveToInbox, getStateID, initializeFromSchedule, initializeFromSubscription, isPrompted, isReady, refresh, setDisplayName, setExpiration, setMaxWait, setMessageID, setPollingFrequency, setPromptsEventHandler, setSaveToInbox, setStateID 
- 
Methods inherited from interface com.microstrategy.web.beans.Transformable
addTransform, addTransformByClass, addTransformByStyle, addTransformByStyle, clearTransforms, getBeanContext, getMessageString, getMyTransformInstances, getTransformInstance, getTransformInstance, getTransformInstances, getType, hasTransform, hasTransform, invalidateTransformCache, setBeanContext, transform, transform 
- 
Methods inherited from interface com.microstrategy.web.beans.WebBean
getDocument, getErrorInfo, getSessionInfo, isStale, setSessionInfo, setStale 
- 
Methods inherited from interface com.microstrategy.web.beans.WebComponent
addChild, addChildStateInfo, addChildStateInfo, collectData, collectMinimalData, generateOutput, getBeanContext, getChild, getChild, getChildByClass, getChildByType, getChildCount, getChildrenByClass, getDefaultStateLevel, getFeaturesManager, getMaximumStateLevel, getName, getOutputFormat, getParent, getPath, getPersistMode, getRenderingFilter, getRoot, getTargetBean, getTargetBeanPath, getWebEvent, getWebEvent, getWebEventHandler, getXMLStatus, handleRequest, hasChanged, hasJustOpened, initBean, invalidateChildrenState, isBeanContextEmpty, isFeatureAvailable, prepareForReuse, removeChild, removeChild, searchChild, setBeanContext, setBeanContext, setChanged, setChanged, setDefaultStateLevel, setFeaturesManager, setName, setOutputFormat, setParent, setPersistMode, setRenderingFilter, setTargetBean, setTargetBeanPath, setWebEventHandler 
 - 
 
 - 
 
- 
- 
Method Detail
- 
getReportInstance
WebReportInstance getReportInstance() throws WebBeanException
Returns theWebReportInstanceobject contained in the current ReportBean. TheWebReportInstanceis where to set result flags, retrieve the report result data, and manipulate the report.- Returns:
 - the 
WebReportInstancecontained. - 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. TheWebReportDatais where to retrieve the report grid data and related information.- Returns:
 - the 
WebReportDatafrom the current report. - Throws:
 WebBeanException- thrown if the report result can not be retrieved.
 
- 
isDrilled
boolean isDrilled() throws WebBeanExceptionReturns 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 theWebGraphobject of the report instance contained in this ReportBean. TheWebGraphinstance could be use to render the report result in graph mode.- Returns:
 - the 
WebGraphobject for the current report instance. - Throws:
 WebBeanException- thrown if error ocurred when retrieving the report graph data.
 
- 
getReportPageInfo
ReportPageInfo getReportPageInfo()
Returns an instance ofReportPageInfo. The page type is defaulted toEnumReportPageType.ReportPageAbsolute. The possible page types are listed underEnumReportPageType.- Returns:
 - an instance of 
ReportPageInfo. 
 
- 
getReportPageInfo
ReportPageInfo getReportPageInfo(int reportPageType)
Returns an instance ofReportPageInfobased on the page type specified. The possible page types are listed underEnumReportPageType.- Parameters:
 reportPageType- the report page type.- Returns:
 - an instance of 
ReportPageInfobased on the page type. 
 
- 
getViewMode
int getViewMode()
Returns the report view mode ofEnumWebReportViewMode. 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 withsetTemplateID.- Parameters:
 filterID- the object id of aWebFilterobject.
 
- 
setTemplateID
void setTemplateID(java.lang.String templateID)
Sets a template ID on the current ReportBean. This method is intended to be used together withsetFilterID.- Parameters:
 templateID- the object id of aWebTemplateobject.
 
- 
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
 
- 
refresh
void refresh() throws WebBeanExceptionRefreshes theWebReportInstancecontained in this ReportBean. This refresh will not reopen the answered prompt, if there is any.- Specified by:
 refreshin interfaceResultSetBean- Throws:
 WebBeanException- thrown if error occurs when refreshing.
 
- 
isPrompted
boolean isPrompted(boolean includeDormant) throws WebBeanExceptionReturns 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 embeddedWebReportSourcewhen running a new report.- Parameters:
 executionFlags- the report execution flags.
 
- 
setViewEventHandler
void setViewEventHandler(WebEventHandler handler)
Set the
WebEventHandlerof itsViewBean.- Parameters:
 handler-ViewBeanevent handler- Since:
 - MicroStrategy Web 8.0.0
 - See Also:
 getViewBean()
 
- 
getViewEventHandler
WebEventHandler getViewEventHandler()
Returns the
WebEventHandlerof itsViewBean.- Returns:
 - the event handler of its 
ViewBean - Since:
 - MicroStrategy Web 8.0.0
 - See Also:
 getViewBean()
 
- 
getViewBean
ViewBean getViewBean() throws WebBeanException
Returns the
ViewBeanof this report. TheViewBeanencapsulates grid and graph data associated with itsWebTemplate.- Returns:
 - the 
ViewBeanassociated with this report - Throws:
 WebBeanException- if there is a problem retrieving the associatedViewBean- Since:
 - MicroStrategy Web 8.0.0
 
 
- 
setGraphBeanName
void setGraphBeanName(java.lang.String name)
Sets the name of its
GraphBean. TheGraphBeanmay be obtained from theViewBean.- Parameters:
 name-GraphBeanname- Since:
 - MicroStrategy Web 8.0.0
 - See Also:
 ViewBean
 
- 
getGraphBeanName
java.lang.String getGraphBeanName()
Returns the name of its
GraphBean. TheGraphBeanmay be obtained from theViewBean.- 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 isEnumWebReportExecutionModes.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 enumerationEnumWebReportExecutionModes- Since:
 - MicroStrategy Web 8.0.0
 
 
- 
getExportSettings
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, whichWebReportExportSettingsmay be cast into:EnumWebReportExecutionModes.REPORT_MODE_PLAIN_TEXT:WebReportPlainTextExportSettingsEnumWebReportExecutionModes.REPORT_MODE_EXCEL:WebReportExcelExportSettingsEnumWebReportExecutionModes.REPORT_MODE_PDF:WebReportPDFExportSettings
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.
 - 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 
ExpressionBeanlinked 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 
ExpressionBeanlinked to the report filter. - Since:
 - MicroStrategy Web 8.0.0
 
 
- 
getResultSettings
WebResultSettings getResultSettings() throws WebBeanException
Returns an instance ofWebResultSettings. 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 fromEnumWebReportSourceType- 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
 
 
- 
populateObject
void populateObject(WebObjectInfo oi) throws WebBeanException
- Throws:
 WebBeanException- Since:
 - MicroStrategy Web 8.0.2
 
 
- 
getVisualizationViewMode
int getVisualizationViewMode() throws WebBeanExceptionReturns 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 WebBeanExceptionSets 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
 
 
- 
applyChanges
void applyChanges() throws WebBeanException- Throws:
 WebBeanException- 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
 
 
- 
setReportInstance
void setReportInstance(WebReportInstance ri)
 
- 
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()
 
- 
directSave
void directSave() throws WebBeanException- Throws:
 WebBeanException
 
- 
directSave
void directSave(java.lang.String desc) throws WebBeanException- Throws:
 WebBeanException
 
- 
directSave
void directSave(java.lang.String desc, int saveFlags) throws WebBeanException- Throws:
 WebBeanException
 
- 
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 
 - 
 
 -