MicroStrategy ONE

WebDrillAction

The WebDrillAction interface represents the actions or transformations that are executed once you choose to drill from the base report. A WebDrillInstance points to a linear ordered collection of drill actions. The WebDrillActions object that contains these drill actions can be retrieved from the drill instance using getDrillActions().

A drill action can be added as a WebDrillAction object to the end of the current linear chain of drill actions using add(int drillType) on the WebDrillActions object. Note that drill actions can be added only at the end of the chain of drill actions in the collection. The drill actions are enumerated using elements(). It is possible to get the drill action at a particular index using the get(int index) method. size() gets the count of the drill actions. The isEmpty() method queries the collection if it is empty.

Drill actions can be removed using remove(int index) or remove(WebDrillAction drillAction) which return the WebDrillAction object that is removed. The collection of drill actions can be cleared using clear(). This method call also clears the source drill template unit set on the drill instance, if any.

Drill actions can be of different types as listed below. Each type can be classified into the following categories: WebDrillAction, WebRemoveMetricDrillAction, WebNewObjectDrillAction, WebGraphCoordinatesDrillAction, and WebNewFormsDrillAction. Note that except for WebDrillAction, all the remaining categories extend the WebDrillAction interface.

tr>
Drill Action Category

DSSXmlDrillFixTemplate

WebDrillAction

DSSXmlDrillRemoveUnit

WebDrillAction

DSSXmlDrillToDetails

WebDrillAction

DSSXmlDrillRemoveMetric

WebRemoveMetricDrillAction

DSSXmlDrillToGraphCoordinates

WebGraphCoordinatesDrillAction

DSSXmlDrillToMetric

WebNewObjectDrillAction

DSSXmlDrillToTemplate

WebNewObjectDrillAction

DSSXmlDrillToUnit

WebNewObjectDrillAction

DSSXmlDrillToChild

WebNewObjectDrillAction

DSSXmlDrillToParent

WebNewObjectDrillAction

DSSXmlDrillToForm

WebNewFormsDrillAction

Most of the categories are self-explanatory. DrillToForm is used to add attribute forms to a report. It can be done using the getForms() method on a WebNewFormsDrillAction object that returns a WebAttributeForms object. This WebAttributeForms object can be populated with the new attribute forms (WebAttribute objects) to which you want to drill.

  • A drill action contains several properties as listed below: 

Property Description

keepOriginal

False = Replaces the selection of a template unit. This is the default value.

True = Keeps selection of a template unit.  The new template is added immediately after this template on the same axis.

filterMetrics

True = Modifies the template so that it only includes those metrics for which the header elements appear in the Elements collection.  If the collection does not contain any metric elements, the metrics on the template are not changed. This is the default value.

False = Does not filter the template to  show only the selected metrics.

name

The name of the drill action.

userFilter

Specifies how the server uses the filter selected by the user. Possible options are DSSUserFilterIgnore (where the user filter is not considered), DSSUserFilterApply (where the user filter, possibly intersected with other filters, appears in the transformed filter), DSSUserFilterRelation (where the server may apply a relationship operator to the user filter before including it in the transformed filter), and DSSUserFilterEvaluate (this is same as DSSUserFilterRelation, however, it instructs the server to perform the relationship task at drill transformation time, rather than at report execution time).

reportFilter

Specifies how the server uses the report's original filter. Possible options are DSSReportFilterIgnore (where  the report filter is not considered when constructing the transformed filter), DSSReportFilterApply (where the report filter, possibly intersected with other filters, appears in the transformed filter), and DSSReportFilterSmart (the default setting where the server attempts to remove anything from the original filter that overlaps with the user filter).

  • A drill unit source is used in WebDrillAction to specify the location from where the template unit for the drill action can be obtained. This value is set using setDrillUnitSource(int drillUnitSource) and read using getDrillUnitSource().

    The possible values for drill unit source are enumerated in EnumDSSXMLDrillUnitSource undercom.microstrategy.webapi. They are described as follows:

Enumeration Name Value Meaning

DssXMLDrillUnitInstance

1

The DrillUnit (if any) specified in the drill instance is used. This is the default value.

DssXMLDrillUnitLocal

2

The template unit (if any) specified in the DrillUnit property on this drill action is used.

DssXMLDrillUnitNone

3

No drill unit is used.

DssXMLDrillUnitRow

4

The bottom unit on the row axis is used.

DssXMLDrillUnitColumn

5

The bottom unit on the column axis is used.

DssXMLDrillUnitPageBy

6

The bottom unit on the page-by axis is used.