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 theWebBean
andObjectBean
interfaces. It reuses theObjectBean
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
-
-
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 void
applyChanges()
boolean
canRedo()
Returns whether can perform redo on this report bean.boolean
canUndo()
Returns whether can perform undo on this report bean.void
clearUndoAndRedo()
Clear the undo and redo state, user could not perform undo and redo This method is called when the save action happens.void
directSave()
void
directSave(java.lang.String desc)
void
directSave(java.lang.String desc, int saveFlags)
boolean
getCanReprompt()
int
getExecutionFlags()
Returns the report execution flags (EnumDSSXMLExecutionFlags
).int
getExecutionMode()
Returns the specified execution mode.WebReportExportSettings
getExportSettings()
Returns export settings object that corresponds to the current execution mode (getExecutionMode()
).ExpressionBean
getFilterBean(int type)
java.lang.String
getGraphBeanName()
Returns the name of itsGraphBean
.boolean
getHasReset()
boolean
getHasUndo()
boolean
getIgnoreUserGridPrefs()
WebReportData
getReportData()
Returns the report result of the report instance contained in this ReportBean.ExpressionBean
getReportFilterBean()
Returns a bean which can be used to view and modify the report filter of the report.WebReportInstance
getReportInstance()
Returns theWebReportInstance
object contained in the current ReportBean.ReportPageInfo
getReportPageInfo()
Returns an instance ofReportPageInfo
.ReportPageInfo
getReportPageInfo(int reportPageType)
Returns an instance ofReportPageInfo
based on the page type specified.int
getResultFlags()
Returns the report result flags (EnumDSSXMLResultFlags
).WebResultSettings
getResultSettings()
Returns an instance ofWebResultSettings
.boolean
getSaved()
java.lang.String
getSaveFolderId()
java.lang.String
getSourceId()
used to get source ID of reportExpressionBean
getUnitLimitBean()
boolean
getUseCaches()
Returns the boolean value indicating whether to use the Intelligence Server's cache to cache the report execution results.ViewBean
getViewBean()
Returns theViewBean
of this report.WebEventHandler
getViewEventHandler()
Returns theWebEventHandler
of itsViewBean
.ExpressionBean
getViewFilterBean()
Returns a bean which can be used to view and modify the view filter of the report.ExpressionBean
getViewLimitBean()
int
getViewMode()
Returns the report view mode ofEnumWebReportViewMode
.int
getVisualizationViewMode()
Returns the current visualization view mode for the report instance.WebGraph
getWebGraph()
Returns theWebGraph
object of the report instance contained in this ReportBean.void
initializeFromSource(java.lang.String sourceID, int sourceType)
Initializes the bean using the source informationboolean
isDrilled()
Returns a boolean value indicating whether the current report instance was obtained after drilling.boolean
isFilterSupported(int type)
boolean
isMdxReport()
boolean
isNewlyCreatedSubsetReport(java.lang.String rid)
boolean
isPrompted(boolean includeDormant)
Returns whether the report is prompted or not.boolean
isSubsetReport()
boolean
isViewModeSwitched()
void
populateObject(WebObjectInfo oi)
void
redo()
Redo the next change we did before and go to next state where this bean was.void
refresh()
Refreshes theWebReportInstance
contained in this ReportBean.void
setApplyChangesOnCollectData(boolean _applyChangesOnCollectData)
void
setCanRePrompt(boolean value)
void
setExecutionFlags(int executionFlags)
Sets the report execution flags (EnumDSSXMLExecutionFlags
).void
setExecutionMode(int mode)
Sets the right execution mode An execution mode indicates what the intended usage of this bean is.void
setFilterID(java.lang.String filterID)
Sets a filter ID on the current ReportBean.void
setGraphBeanName(java.lang.String name)
Sets the name of itsGraphBean
.void
setHasReset(boolean _value)
void
setIgnoreUserGridPrefs(boolean val)
void
setReportInstance(WebReportInstance ri)
void
setResultFlags(int resultFlags)
Sets the report result flags (EnumDSSXMLResultFlags
).void
setSaved(boolean _saved)
void
setSaveFolderId(java.lang.String folderId)
void
setTemplateID(java.lang.String templateID)
Sets a template ID on the current ReportBean.void
setUseCaches(boolean useCaches)
Sets the boolean value indicating whether to use the Intelligence Server's cache to cache the report execution results.void
setViewEventHandler(WebEventHandler handler)
Set theWebEventHandler
of itsViewBean
.void
setViewMode(int viewMode)
Sets the report view mode (EnumWebReportViewMode
) on the current ReportBean.void
setViewModeSwitched(boolean _isViewModeSwitched)
void
setVisualizationViewMode(int viewMode)
Sets the visualization view mode for the report instance.void
undo()
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 theWebReportInstance
object contained in the current ReportBean. TheWebReportInstance
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. TheWebReportData
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 theWebGraph
object of the report instance contained in this ReportBean. TheWebGraph
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 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 ofReportPageInfo
based on the page type specified. The possible page types are listed underEnumReportPageType
.- Parameters:
reportPageType
- the report page type.- Returns:
- an instance of
ReportPageInfo
based 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 aWebFilter
object.
-
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 aWebTemplate
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
-
refresh
void refresh() throws WebBeanException
Refreshes theWebReportInstance
contained in this ReportBean. This refresh will not reopen the answered prompt, if there is any.- Specified by:
refresh
in interfaceResultSetBean
- Throws:
WebBeanException
- thrown if error occurs when refreshing.
-
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 embeddedWebReportSource
when running a new report.- Parameters:
executionFlags
- the report execution flags.
-
setViewEventHandler
void setViewEventHandler(WebEventHandler handler)
Set the
WebEventHandler
of itsViewBean
.- Parameters:
handler
-ViewBean
event handler- Since:
- MicroStrategy Web 8.0.0
- See Also:
getViewBean()
-
getViewEventHandler
WebEventHandler getViewEventHandler()
Returns the
WebEventHandler
of itsViewBean
.- 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. TheViewBean
encapsulates grid and graph data associated with itsWebTemplate
.- Returns:
- the
ViewBean
associated 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
. TheGraphBean
may be obtained from theViewBean
.- Parameters:
name
-GraphBean
name- Since:
- MicroStrategy Web 8.0.0
- See Also:
ViewBean
-
getGraphBeanName
java.lang.String getGraphBeanName()
Returns the name of its
GraphBean
. TheGraphBean
may 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, whichWebReportExportSettings
may be cast into:EnumWebReportExecutionModes.REPORT_MODE_PLAIN_TEXT
:WebReportPlainTextExportSettings
EnumWebReportExecutionModes.REPORT_MODE_EXCEL
:WebReportExcelExportSettings
EnumWebReportExecutionModes.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
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 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 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
-
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
-
-