Main Page | Class Hierarchy | Class List | File List | Class Members | File Members

IDSSScriptServer Interface Reference

Inherited by IDSSScriptServer2.

List of all members.


Detailed Description

The IDSSScriptServer interface is used to support the client to send a request to a server and to poll the results from a server.

This interface is exposed from Script Server, a 3-tier client-side DSS component, which can be gotten from a 3-tier session object. The user should have DssPrivilegesUseServerAdmin privilege and Write access right on the Server to use the methods of this interface.


Public Member Functions

HRESULT CancelRequest ([in] Int32 JobID,[in, defaultvalue(0)] Int32 Flag)
 Cancel the request job This method is used to cancel a request on a server.
HRESULT GetRequestResult ([in] Int32 JobID,[in, defaultvalue(0)] Int32 Flag,[out, optional] Int32 *pNumberOfRemainingItems,[out, optional] Int32 *pNumberOfItems,[out, optional] VARIANT *pResultIDs,[out, optional] VARIANT *pResultCodes,[out, optional] VARIANT *pReportResultXMLs,[out, optional] VARIANT *pReportGraphResults)
 Poll results of a request from the server This method is used to poll results of a request from a server.
HRESULT ReportView ([in] BSTR ReportID,[in, defaultvalue(1)] VARIANT *pAttributeIndex,[in, optional] BSTR GraphViewSettingXML,[in, defaultvalue(0)] Int32 Locale,[in, defaultvalue(0)] Int32 Flag,[out, retval] IDSSReportView ppReportView)
 Ask for running a report with PageBy ready.
HRESULT SendRequest ([in] BSTR ReportID,[in] Int32 NumberOfItems,[in] VARIANT *pResultIDs,[in, optional] VARIANT *pUserIDs,[in, optional] VARIANT *pUserIDIndexes,[in, optional] VARIANT *pResolutionXMLs,[in, optional] VARIANT *pResolutionXMLIndexes,[in, optional] VARIANT *pFilterXMLs,[in, optional] VARIANT *pFilterXMLIndexes,[in, optional] BSTR GraphViewSettingXML,[in, defaultvalue(0)] Int32 Locale,[in, defaultvalue(0)] Int32 Flag,[out, retval] Int32 *pJobID)
 Send a request to the server.


Member Function Documentation

HRESULT IDSSScriptServer::CancelRequest [in] Int32  JobID,
[in, defaultvalue(0)] Int32  Flag
 

Cancel the request job This method is used to cancel a request on a server.

Each call of this method will kill all items from the original request, and cancel the request as a whole.

The result includes
  • ResultCode, which indicates whether the execution is succeeded for this request item
None.
Parameters:
JobID a long value JobID that indicates a request job
Flag a long value flag will be used to indicate some special requirement (not used now)
Returns:
Usual COM result code:
  • S_OK The job was successfully cancelled
  • E_INVALIDARG The job ID should be no negative long value.
  • SCRSVR_E_CLOSED The Script Server is closed.

HRESULT IDSSScriptServer::GetRequestResult [in] Int32  JobID,
[in, defaultvalue(0)] Int32  Flag,
[out, optional] Int32 *  pNumberOfRemainingItems,
[out, optional] Int32 *  pNumberOfItems,
[out, optional] VARIANT *  pResultIDs,
[out, optional] VARIANT *  pResultCodes,
[out, optional] VARIANT *  pReportResultXMLs,
[out, optional] VARIANT *  pReportGraphResults
 

Poll results of a request from the server This method is used to poll results of a request from a server.

Each call of this method will collect the results of these items that were finished and not been retrieved. If it fails, an error will be returned.

If pNumberOfItmes is -1, it indicates that all the results of request items of this request were retrieved.
The results of each request item includes
  • ResultID, which identifies this request item
  • ResultCode, which indicates whether the execution is succeeded for this request item
  • ReportResultXML, which contains the result of the report execution if ResultCode is S_OK, or the error message if ResultCode is not S_OK.
  • ReportGraphResult (optional), which contains the graph result of the report execution if graph result is required and ResultCode is S_OK. The graph results are represented in binary format.
Parameters:
JobID a long value JobID that indicates a request job
Flag a long value flag will be used to indicate some special requirement (not used now)
pNumberOfRemainingItems a pointer to a long-value count that indicates how many items have not been fetched
pNumberOfItems a pointer to a long-value count that indicates how many results will be returned in this call
pResultIDs a pointer to a SAFEARRAY of BSTRs that contain GUIDs of the ResultIDs
pResultCodes a pointer to a SAFEARRAY of long-value that contain the error codes of the report executions
pReportResultXMLs a pointer to a SAFEARRAY of BSTRs that contain the results of the report executions, either the XML or the error message
pReportGraphResults A pointer to a SAFEARRAY of binary arrays (SAFEARRAY of U1) that contains the graph results of the report execution.
Returns:
Usual COM result code:
  • S_OK
  • E_INVALIDARG The job ID should be no negative long value.
  • E_POINTER The memory of one out parameter is not allocated before calling this method.
  • AUTHEN_E_USER_NO_PRIV The user does not have DssPrivilegesUseServerAdmin privilege.
  • MSI_COMMANDPERMISSION_ERROR The user does not have Write access right on the Server.
  • SCRSVR_E_CLOSED The Script Server is closed.
  • SCRSVR_E_MSG_CORRUPT The message returned from server is corrupted.

HRESULT IDSSScriptServer::ReportView [in] BSTR  ReportID,
[in, defaultvalue(1)] VARIANT *  pAttributeIndex,
[in, optional] BSTR  GraphViewSettingXML,
[in, defaultvalue(0)] Int32  Locale,
[in, defaultvalue(0)] Int32  Flag,
[out, retval] IDSSReportView   ppReportView
 

Ask for running a report with PageBy ready.

This property is used to ask DSS Server to run a base report with PageBy ready on an attribute row or column. The result is the base report with PageBy ready on an attribute. The caller uses a long-value index to indicate which attribute row or column. If the row or column is not an attribute, an error will be returned.

Through returned IDSSReportView interface, the caller can get the list of values in text form of the attribute element on this attribute row or column. The caller also can get the PageBy results of the attribute elements.
None.
Parameters:
ReportID The GUID of the report
pAttributeIndex A pointer to the index to indicate which attribute row or column. Currently, only long value index is supported.
GraphViewSettingXML The XML contains the settings of the graph
Locale The locale used for this request. 0 means using the one of the logged in user.
Flag a long value flag will be used to provides additional requirement. It is a bit-wise enumeration type. The current available value includes:
ppReportView An pointer to IDSSReportView that has base report with PageBy ready on an attribute row or column
Returns:
Usual COM result code:
  • S_OK
  • E_INVALIDARG Invalid attribute index, or invalid report ID, or invalid flag
  • E_POINTER The memory of ppReportView is not allocated before calling this method.
  • SCRSVR_E_CLOSED The Script Server is closed.

HRESULT IDSSScriptServer::SendRequest [in] BSTR  ReportID,
[in] Int32  NumberOfItems,
[in] VARIANT *  pResultIDs,
[in, optional] VARIANT *  pUserIDs,
[in, optional] VARIANT *  pUserIDIndexes,
[in, optional] VARIANT *  pResolutionXMLs,
[in, optional] VARIANT *  pResolutionXMLIndexes,
[in, optional] VARIANT *  pFilterXMLs,
[in, optional] VARIANT *  pFilterXMLIndexes,
[in, optional] BSTR  GraphViewSettingXML,
[in, defaultvalue(0)] Int32  Locale,
[in, defaultvalue(0)] Int32  Flag,
[out, retval] Int32 *  pJobID
 

Send a request to the server.

If it succeeds, a JobID will be returned, which is used to poll the results of this request, or to monitor the job, or to cancel the job. If it fails, an error will be returned.

A request includes
  • ReportID, which indicate the report
  • GraphViewSettingXML (optional), which contains the graph settings such as GraphStartRow, GraphStartCol, GraphMaxRows, GraphMaxCols, GraphHeigh, GraphWidth, GraphMajorType, GraphMinorType. The default values for these settings are 1 (GraphStartRow), 1 (GraphStartCol), all rows (GraphMaxRows), all columns (GraphMaxCols), DssXmlMajorGraphTypeVerticalBar (GraphMajorType), and DssXmlVAreaMinorTypeAbsolute (GraphMinorType).
  • Locale (optinal), which indicates the locale used for this request. 0 means using the one of the logged in user.
  • Flag (optional), which provides additional information, such as whether graphic results are required. It is a bit-wise-long-value flag.
  • List of request items, each includes
  • ResultID, which is used to identify this request item,
  • UserID, which indicates the User
  • ResolutionXML, which indicates the Broadcaster personalization
  • FilterXML, which indicates the Broadcaster security
Where, UserID, ResolutionXML, or FilterXML is optional. NULL BSTR will be used to indicate that no value is provided.
Since there are many duplicates in UserIDs, ResolutionXMLs, FilterXMLs, the sender may choice to provide no-duplicate UserIDs, ResolutionXMLs, FilterXMLs with long-value index arrays that are used to specify which user, or resolution, or filter is associated with the request item. If the index array (e.g. the index array for ResolutionXMLs) is not provided, the corresponding one (e.g. ResolutionXMLs) is treated as one-to-one relationship with the request item.
None.
Parameters:
ReportID The GUID of the report
NumberOfItems The long-value count of items in this request
pResultIDs a SAFEARRAY of BSTRs that contain GUIDs of ResultIDs
pUserIDs a SAFEARRAY of BSTRs that contain GUIDs of Users
pUserIDIndexes a SAFEARRAY of longs that contain the indexes to pUserIDs, which indicates which user is associated with this request item (0 indicates that no special user is associated with this request item)
pResolutionXMLs a SAFEARRAY of BSTRs that contain XMLs of the resolutions
pResolutionXMLIndexes a SAFEARRAY of longs that contain the indexes to pResolutionXMLs, which indicates which resolution is associated with this request item (0 indicates that no resolution is associated with this request item)
pFilterXMLs a SAFEARRAY of BSTRs that contain XMLs of the filters
pFilterXMLIndexes a SAFEARRAY of longs that contain the indexes to pFilterXMLs, which indicates which filter is associated with this request item (0 indicates that no filter is associated with this request item)
GraphViewSettingXML The XML contains the settings of the graph
Locale The locale used for this request.
Flag a long value flag will be used to provides additional requirement. It is a bit-wise enumeration type. The current available value includes:
pJobID The pointer to a long value that indicates the job ID for this request
Returns:
Usual COM result code:
  • S_OK
  • E_INVALIDARG No request items, or invalid report ID, or invalid flag, or invalid SAFEARRAYs
  • E_POINTER The memory of pJobID is not allocated before calling this method.
  • AUTHEN_E_USER_NO_PRIV The user does not have DssPrivilegesUseServerAdmin privilege.
  • MSI_COMMANDPERMISSION_ERROR The user does not have Write access right on the Server.
  • SCRSVR_E_CLOSED The Script Server is closed.


Copyright © 1996-2018 MicroStrategy Inc. All Rights Reserved.