public class

MWSReportExecution

extends Object
java.lang.Object
   ↳ com.microstrategy.webservices.MWSReportExecution

Summary

Constants
int DEFAULT_MAX_WAIT
int DEFAULT_POLLING_FREQUENCY
long DEFAULT_SLEEP_TIME
int RESULTRAWDATA
Fields
protected String[] CSVStringArray
protected String ENABLEDVALUE
protected String FALSEPROPERTY
protected String ISV_AUTOSIZE
protected String ISV_CANCELFIX
protected String ISV_CSVFORMATFLAGS
protected String ISV_ENHANCEDGRAPHPROPERTIES
protected String ISV_EXCELVERSIONFOREXPORT
protected String ISV_EXTRAFLASHINFO
protected String ISV_LAYOUTSFOREXPORT
protected String ISV_OOXML
protected String ObjMsgID
protected String VIEWMODEGRAPH
protected String VIEWMODEGRID
protected String VIEWMODEGRIDGRAPH
protected String[] XMLStringArray
protected String _ObjID
protected WebObjectInfo _WOI
protected EnumMWSExecutionFlags _eFlags
protected EnumMWSResultFlags _eResults
protected boolean _fADORecordset
protected boolean _fAddToHistory
protected boolean _fAttachIndex
protected boolean _fAttachXML
protected boolean _fCSVNoFormatting
protected boolean _fCSVNoMetricsCol
protected boolean _fCSVNoThresholds
protected boolean _fCubeReport
protected boolean _fDataMart
protected boolean _fExecute
protected boolean _fExportAll
protected boolean _fExportCurrent
protected boolean _fExportCurrentLayout
protected boolean _fExportCurrentWindow
protected boolean _fExportDefault
protected boolean _fFlatten
protected boolean _fGraphImgBMP
protected boolean _fGraphImgGIF
protected boolean _fGraphImgJPEG
protected boolean _fGraphImgPNG
protected boolean _fImplicit
protected boolean _fInitiatedAsReport
protected boolean _fIsPrompted
protected boolean _fNoCache
protected boolean _fRePrompt
protected boolean _fReport
protected boolean _fResultSizeOnly
protected boolean _fReturnCSV
protected boolean _fReturnGraphBytes
protected boolean _fReturnHeaderInfo
protected boolean _fReturnImages
protected boolean _fReturnLayouts
protected boolean _fReturnPDF
protected boolean _fReturnSQL
protected boolean _fRunAsChart
protected boolean _fRunAsync
protected boolean _fSaveToHistory
protected boolean _fUseDefaults
protected boolean _fVisualization
protected MWSConnection connection
protected byte[][] imageArray
Public Constructors
MWSReportExecution(MWSConnection cConnect)
Public Methods
void ApplyRulesIfImplicit(String rptID)
Checks if implicit execution is desired and if so, modifies the execution flags based on the report's subtype.
void Cancel(String sMsgID)
Cancels an executing report.
ArrayOfMWSPromptSuggestions CheckForPartialPrompts(WebPrompts wp)
Processes the prompt xml looking for partial or missing prompt suggestion lists.
boolean DoesIServerSupportFeature(String sFeatureVersion)
Checks the version of the server that is currently connected and returns true if it is the same or newer than the version of the I-Server that supports the desired feature version.
MWSExecuteInfo Execute(String sName, String sID, String sAnswerPrompt, EnumMWSExecutionFlags eFlags, MWSResultsWindow resultsWindow, String sStyle, EnumMWSResultFlags eResults, MWSExecutionSettings eSettings)
MWSExecuteInfo GetResults(String sPrompt, String sRptID, String sMsgID, EnumMWSExecutionFlags eFlags, MWSResultsWindow resultsWindow, String sStyle, EnumMWSResultFlags eResults, MWSExecutionSettings eSettings)
Checks the status of an executing report.
String GetSWFNameFromCatalog(String sVisualization)
Looks up the style name in the stylecatalog and returns the filename for it.
int InitExecutionFlags()
Takes the input enumeration list of execution flags and sets internal boolean flags based on the values present.
boolean IsExecutionCancelled(int errCode)
Checks exception status to determine if a cancel has been detected.
boolean IsPre75IServer()
Checks the version of the server that is currently connected and returns true if it's a pre-7.5 I-Server, false otherwise.
boolean IsPre801Server()
Checks the version of the server that is currently connected and returns true if it's a pre-8.0 SP1 I-Server, false otherwise.
MWSExecuteInfo ProcessResult(WebReportInstance wri, String rptID, EnumMWSExecutionFlags eFlags, EnumMWSResultFlags eResults, String promptXML, MWSResultsWindow resultsWindow, boolean fDocExecute, MWSExecutionSettings eSettings)
Handles the checking of status and setting up of execution information return structure for a report
String SearchForID(String name, boolean isReport)
Performs a search for the object with the specified name.
String[] getCSVArray()
Returns the entire CSV Array.
int getCSVArraySize()
Returns the size of the CSV string array.
String getCSVString(int index)
Returns the CSV string at the desired index.
byte[][] getImageArray()
Returns the entire Array of Byte[] Array.
int getImageArraySize()
Returns the size of the array of bytes array.
String getObjIDFromMsgID(String sMsgID, int iObjType)
WebObjectInfo getObjInfoFromID(String sObjID, int iObjType)
String getObjNameFromID(String sObjID, int iObjType)
String getObjNameFromMsgID(String sMsgID, int iObjType)
String getRptIDFromInstance(WebReportInstance rptInst)
String getRptNameFromInstance(WebReportInstance rptInst)
String[] getXMLArray()
Returns the entire XML Array.
int getXMLArraySize()
Returns the size of the XML string array.
String getXMLString(int index)
Returns the XML string at the desired index.
void testPromptedCGExecution()
[Expand]
Inherited Methods
From class java.lang.Object

Constants

protected static final int DEFAULT_MAX_WAIT

Constant Value: 900000 (0x000dbba0)

protected static final int DEFAULT_POLLING_FREQUENCY

Constant Value: 250 (0x000000fa)

protected static final long DEFAULT_SLEEP_TIME

Constant Value: 2000 (0x00000000000007d0)

protected static final int RESULTRAWDATA

Constant Value: 8192 (0x00002000)

Fields

protected String[] CSVStringArray

protected String ENABLEDVALUE

protected String FALSEPROPERTY

protected String ISV_AUTOSIZE

protected String ISV_CANCELFIX

protected String ISV_CSVFORMATFLAGS

protected String ISV_ENHANCEDGRAPHPROPERTIES

protected String ISV_EXCELVERSIONFOREXPORT

protected String ISV_EXTRAFLASHINFO

protected String ISV_LAYOUTSFOREXPORT

protected String ISV_OOXML

protected String ObjMsgID

protected String VIEWMODEGRAPH

protected String VIEWMODEGRID

protected String VIEWMODEGRIDGRAPH

protected String[] XMLStringArray

protected String _ObjID

protected WebObjectInfo _WOI

protected EnumMWSExecutionFlags _eFlags

protected EnumMWSResultFlags _eResults

protected boolean _fADORecordset

protected boolean _fAddToHistory

protected boolean _fAttachIndex

protected boolean _fAttachXML

protected boolean _fCSVNoFormatting

protected boolean _fCSVNoMetricsCol

protected boolean _fCSVNoThresholds

protected boolean _fCubeReport

protected boolean _fDataMart

protected boolean _fExecute

protected boolean _fExportAll

protected boolean _fExportCurrent

protected boolean _fExportCurrentLayout

protected boolean _fExportCurrentWindow

protected boolean _fExportDefault

protected boolean _fFlatten

protected boolean _fGraphImgBMP

protected boolean _fGraphImgGIF

protected boolean _fGraphImgJPEG

protected boolean _fGraphImgPNG

protected boolean _fImplicit

protected boolean _fInitiatedAsReport

protected boolean _fIsPrompted

protected boolean _fNoCache

protected boolean _fRePrompt

protected boolean _fReport

protected boolean _fResultSizeOnly

protected boolean _fReturnCSV

protected boolean _fReturnGraphBytes

protected boolean _fReturnHeaderInfo

protected boolean _fReturnImages

protected boolean _fReturnLayouts

protected boolean _fReturnPDF

protected boolean _fReturnSQL

protected boolean _fRunAsChart

protected boolean _fRunAsync

protected boolean _fSaveToHistory

protected boolean _fUseDefaults

protected boolean _fVisualization

protected MWSConnection connection

protected byte[][] imageArray

Public Constructors

public MWSReportExecution (MWSConnection cConnect)

Public Methods

public void ApplyRulesIfImplicit (String rptID)

Checks if implicit execution is desired and if so, modifies the execution flags based on the report's subtype.

Parameters
rptID String identifying report to apply rules to

public void Cancel (String sMsgID)

Cancels an executing report.

Parameters
sMsgID string representing the message id associated with the report
Throws
MWSException

public ArrayOfMWSPromptSuggestions CheckForPartialPrompts (WebPrompts wp)

Processes the prompt xml looking for partial or missing prompt suggestion lists.

Parameters
wp WebPrompts object containing the report prompt collection
Returns
  • ArrayOfMWSPromptSuggestions
Throws
MWSException

public boolean DoesIServerSupportFeature (String sFeatureVersion)

Checks the version of the server that is currently connected and returns true if it is the same or newer than the version of the I-Server that supports the desired feature version.

Returns
  • True if same or newer I-Server version

public MWSExecuteInfo Execute (String sName, String sID, String sAnswerPrompt, EnumMWSExecutionFlags eFlags, MWSResultsWindow resultsWindow, String sStyle, EnumMWSResultFlags eResults, MWSExecutionSettings eSettings)

Throws
MWSException

public MWSExecuteInfo GetResults (String sPrompt, String sRptID, String sMsgID, EnumMWSExecutionFlags eFlags, MWSResultsWindow resultsWindow, String sStyle, EnumMWSResultFlags eResults, MWSExecutionSettings eSettings)

Checks the status of an executing report. If results are available, return the result to client. If a prompted report, the prompt XML is returned to the client. The subsequent call to this method contains the prompt answer, which is submitted to the I-Server and execution continues.

Parameters
sPrompt answer prompt xml to run report with.
sRptID string representing the object id associated with the report
sMsgID string representing the message id associated with the report
eFlags specifies options to execute report with
resultsWindow specifies options for incremental fetch and page by
Returns
  • MWSExecuteInfo structure containing results and status
Throws
MWSException
MWSException

public String GetSWFNameFromCatalog (String sVisualization)

Looks up the style name in the stylecatalog and returns the filename for it.

Parameters
sVisualization string representing the style name.
Returns
  • string containing the filename associated with the style.
Throws
MWSException

public int InitExecutionFlags ()

Takes the input enumeration list of execution flags and sets internal boolean flags based on the values present.

Returns
  • int representation of Web Objects execution flags

public boolean IsExecutionCancelled (int errCode)

Checks exception status to determine if a cancel has been detected.

Parameters
errCode int representing the exception error code
Returns
  • True if cancel detected

public boolean IsPre75IServer ()

Checks the version of the server that is currently connected and returns true if it's a pre-7.5 I-Server, false otherwise.

Returns
  • True if pre-7.5 I-Server

public boolean IsPre801Server ()

Checks the version of the server that is currently connected and returns true if it's a pre-8.0 SP1 I-Server, false otherwise.

Returns
  • True if pre-8.0 SP1 I-Server

public MWSExecuteInfo ProcessResult (WebReportInstance wri, String rptID, EnumMWSExecutionFlags eFlags, EnumMWSResultFlags eResults, String promptXML, MWSResultsWindow resultsWindow, boolean fDocExecute, MWSExecutionSettings eSettings)

Handles the checking of status and setting up of execution information return structure for a report

Parameters
wri WebReportInstance of the report
rptID String containing the report ID
eFlags specifies options the report was executed with
resultsWindow specifies options for incremental fetch and page by
fDocExecute Boolean indicating if this method is being called from document execution or not
Returns
  • MWSExecuteInfo structure containing results and status
Throws
MWSException
MWSException

public String SearchForID (String name, boolean isReport)

Performs a search for the object with the specified name.

Parameters
name string representing the object name
isReport flag identifying object as a report or document
Returns
  • string representing the object ID
Throws
MWSException

public String[] getCSVArray ()

Returns the entire CSV Array.

Returns
  • string[] representing the CSV array

public int getCSVArraySize ()

Returns the size of the CSV string array.

Returns
  • int representing size of CSV string array

public String getCSVString (int index)

Returns the CSV string at the desired index.

Parameters
index int Index of CSV string to return
Returns
  • string representing the CSV string

public byte[][] getImageArray ()

Returns the entire Array of Byte[] Array.

Returns
  • byte[][] representing the Array of Byte[] array

public int getImageArraySize ()

Returns the size of the array of bytes array.

Returns
  • int representing size of array of bytes array

public String getObjIDFromMsgID (String sMsgID, int iObjType)

public WebObjectInfo getObjInfoFromID (String sObjID, int iObjType)

public String getObjNameFromID (String sObjID, int iObjType)

public String getObjNameFromMsgID (String sMsgID, int iObjType)

public String getRptIDFromInstance (WebReportInstance rptInst)

public String getRptNameFromInstance (WebReportInstance rptInst)

public String[] getXMLArray ()

Returns the entire XML Array.

Returns
  • string[] representing the XML array

public int getXMLArraySize ()

Returns the size of the XML string array.

Returns
  • int representing size of XML string array

public String getXMLString (int index)

Returns the XML string at the desired index.

Parameters
index int Index of XML string to return
Returns
  • string representing the XML string

public void testPromptedCGExecution ()