Skip to main content

DeepSeeDataController

Enables you to work with a Business Intelligence data source.

Where This Object Is Available

This object is available in client-side JavaScript code, if that code includes DeepSee.js. See Introduction to DeepSee.js.

Creating This Object

To create a Business Intelligence data controller object, use code like the following:

var controller = new DeepSeeDataController(configuration,finalCallback,pendingCallback);

Where:

  • configuration is an object that has the following properties:

    • connection — Is a Business Intelligence data connector object.

    • widget — Specifies the id of the HTML element on the page that will use the data controller

    • type — Specifies the type of data source; use either 'MDX' or 'PIVOT' (case-sensitive)

    • initialMDX — Specifies an MDX SELECT query; specify this property if type is 'MDX'

    • pivotName — Specifies the logical name of a pivot table; specify this property if type is 'PIVOT'

    • showTotals — Specifies whether to display totals; specify this property as true or false

  • finalCallback is the name of a callback function on this page

    For runQuery() and other methods of this object, when the query is completed, the system invokes this function.

  • pendingCallback (optional) is the name of another callback function on this page.

    For runQuery() and other methods of this object, when pending results are available, the system invokes this function, if this argument is supplied.

Methods of This Object

The Business Intelligence data controller object provides the following JavaScript methods:

applyFilter()
applyFilter(filterInfo)

Where filterInfo is an object that contains the filterName and filterSpec properties.

This method adds the given filter to the filters used by the data controller, reruns the query, and then invokes the callback functions associated with the data controller object.

This method has no return value.

attachTotals()
attachTotals(rowTotals,columnTotals,reattach)

Where:

  • rowTotals is true or false, depending on whether you want to attach totals for the rows.

  • columnTotals is true or false, depending on whether you want to attach totals for the columns.

  • reattach is true or false, depending on whether you want to update the most recently saved state.

    If reattach is true, the system updates the most recently saved state. If reattach is false, the system adds a new state object to the stack.

This method attaches totals to the data controller object and then invokes the callback functions associated with the data controller object.

This method has no return value.

getCurrentData()
getCurrentData()

Returns a Business Intelligence result set object that contains the results from the query currently defined by the data controller object. See the reference for the DeepSeeResultSet object.

getCurrentQueryText()
getCurrentQueryText()

Returns the text of the query currently defined by the data controller object.

runDrillDown()
runDrillDown(axis, position)

Where:

  • axis is the number of the axis on which you want to perform the drilldown action. Specify 1 for column or 2 for rows.

  • position is the position (1–based) on that axis where you want to perform the drilldown action.

This method executes the given drilldown action, and then invokes the callback functions associated with the data controller object.

This method has no return value.

runListing()
runListing(startRow, startCol, endRow, endCol, listingName)

Where:

  • startRow and startCol are the first row and column number of the results for which you want a detail listing. Specify 1 for the first row or column.

  • endRow and endCol are the last row and column number for which you want a detail listing.

  • listingName is the logical name of a detail listing.

This method executes the given detail listing for one or more cells of the results, and then invokes the callback functions associated with the data controller object.

This method has no return value.

runQuery()
runQuery()

Executes the query currently defined by the data controller object. When the query is pending or completed, the system invokes the callback functions associated with the data controller object.

This method has no return value.

sortResults()
sortResults(axis, position, direction, sortType)

Where:

  • axis is the number of the axis you want to sort. Specify 1 for column or 2 for rows.

  • position is the position (1–based) on that axis where you want to sort.

    For example, to sort by the third column, specify axis as 1 and position as 3.

  • direction is the direction in which to sort. Specify 1 for ascending sort or –1 or descending sort.

  • sortType specifies how to sort. If this is '' or 'numeric' (case-insensitive), numeric sorting is used. Otherwise, string sorting is used.

This method sorts the results as requested and then invokes the callback functions associated with the data controller object.

This method has no return value.

undoLastAction()
undoLastAction()

Undoes the last change and invokes the callback functions associated with the data controller object.

This method has no return value.

FeedbackOpens in a new tab